Go to the documentation of this file.
42 if(!
lookup(identifier, check_symbol))
47 symbol.
name=identifier;
50 symbol.
mode = current_mode;
62 error() <<
"cpp_typecheckt::convert_parameter: symbol_table.move(\""
63 << symbol.
name <<
"\") failed" <<
eom;
78 for(code_typet::parameterst::iterator
79 it=parameters.begin();
109 assert(parameters.size()>=1);
129 ID_already_typechecked)
176 code_typet::parameterst::const_iterator it=
179 if(it != parameters.end() && it->get_this())
181 const typet &pointer=it->type();
194 for(; it!=parameters.end(); it++)
200 typet tmp_type=it->type();
void copy_to_operands(const exprt &expr)
Copy the given argument to the end of exprt's operands.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const typet & subtype() const
void convert_function(symbolt &symbol)
The type of an expression, extends irept.
std::vector< parametert > parameterst
typet type
Type of symbol.
void convert_parameter(const irep_idt ¤t_mode, code_typet::parametert ¶meter)
void set_identifier(const irep_idt &identifier)
const symbolt & lookup(const irep_idt &name) const
Lookup a symbol in the namespace.
irep_idt base_name
Base (non-scoped) name.
codet dtor(const symbolt &symb, const symbol_exprt &this_expr)
produces destructor code for a class object
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
Expression to hold a symbol (variable)
cpp_idt & put_into_scope(const symbolt &symbol, cpp_scopet &scope, bool is_friend=false)
const codet & to_code(const exprt &expr)
const typet & template_subtype(const typet &type)
typet & type()
Return the type of the expression.
bool get_bool(const irep_namet &name) const
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
irep_idt mode
Language mode.
mstreamt & result() const
const irep_idt & get_base_name() const
bool has_operands() const
Return true if there is at least one operand.
const std::string & id2string(const irep_idt &d)
cpp_scopet & current_scope()
source_locationt source_location
#define PRECONDITION(CONDITION)
symbol_tablet & symbol_table
std::unordered_set< irep_idt > deferred_typechecking
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
void convert_parameters(const irep_idt ¤t_mode, code_typet &function_type)
const irep_idt & id() const
irep_idt function_identifier(const typet &type)
for function overloading
const parameterst & parameters() const
C++ Language Type Checking.
void set_base_name(const irep_idt &name)
virtual bool move(symbolt &symbol, symbolt *&new_symbol) override
Move a symbol into the symbol table.
exprt value
Initial value of symbol.
void typecheck_code(codet &) override
std::string cpp_type2name(const typet &type)
bool is_reference(const typet &type)
Returns true if the type is a reference.
const irep_idt & get(const irep_namet &name) const
source_locationt location
Source code location of definition of symbol.
const irep_idt & get_identifier() const
const typet & return_type() const
virtual void start_typecheck_code()
Symbol table entry of function parameterThis is a symbol generated as part of type checking.
irep_idt module
Name of module the symbol belongs to.
const multi_ary_exprt & to_multi_ary_expr(const exprt &expr)
Cast an exprt to a multi_ary_exprt.
const source_locationt & source_location() const
irep_idt name
The unique identifier.
cpp_scopet & set_scope(const irep_idt &identifier)