39 if(!
lookup(identifier, check_symbol))
44 symbol.
name=identifier;
47 symbol.
mode = current_mode;
59 error() <<
"cpp_typecheckt::convert_parameter: symbol_table.move(\""
60 << symbol.
name <<
"\") failed" <<
eom;
75 for(code_typet::parameterst::iterator
76 it=parameters.begin();
91 if(symbol.
value.
id() != ID_code)
94 error() <<
"function '" << symbol.
name <<
"' is initialized with "
134 ID_already_typechecked)
181 code_typet::parameterst::const_iterator it=
184 if(it != parameters.end() && it->get_this())
186 const typet &pointer=it->type();
199 for(; it!=parameters.end(); it++)
205 typet tmp_type=it->type();
symbol_table_baset & symbol_table
virtual void start_typecheck_code()
void set_base_name(const irep_idt &name)
const irep_idt & get_base_name() const
const irep_idt & get_identifier() const
void set_identifier(const irep_idt &identifier)
std::vector< parametert > parameterst
const typet & return_type() const
const parameterst & parameters() const
cpp_scopet & current_scope()
cpp_scopet & set_scope(const irep_idt &identifier)
cpp_idt & put_into_scope(const symbolt &symbol, cpp_scopet &scope, bool is_friend=false)
void typecheck_code(codet &) override
void convert_function(symbolt &symbol)
codet dtor(const symbolt &symb, const symbol_exprt &this_expr)
produces destructor code for a class object
std::unordered_set< irep_idt > deferred_typechecking
irep_idt function_identifier(const typet &type)
for function overloading
void convert_parameter(const irep_idt ¤t_mode, code_typet::parametert ¶meter)
void convert_parameters(const irep_idt ¤t_mode, code_typet &function_type)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool has_operands() const
Return true if there is at least one operand.
void copy_to_operands(const exprt &expr)
Copy the given argument to the end of exprt's operands.
const source_locationt & source_location() const
typet & type()
Return the type of the expression.
bool get_bool(const irep_idt &name) const
const irep_idt & get(const irep_idt &name) const
const irep_idt & id() const
source_locationt source_location
mstreamt & result() const
const symbolt & lookup(const irep_idt &name) const
Lookup a symbol in the namespace.
Symbol table entry of function parameterThis is a symbol generated as part of type checking.
const typet & base_type() const
The type of the data what we point to.
Expression to hold a symbol (variable)
virtual bool move(symbolt &symbol, symbolt *&new_symbol)=0
irep_idt base_name
Base (non-scoped) name.
irep_idt module
Name of module the symbol belongs to.
source_locationt location
Source code location of definition of symbol.
typet type
Type of symbol.
irep_idt name
The unique identifier.
exprt value
Initial value of symbol.
irep_idt mode
Language mode.
The type of an expression, extends irept.
const typet & template_subtype(const typet &type)
std::string cpp_type2name(const typet &type)
C++ Language Type Checking.
const std::string & id2string(const irep_idt &d)
bool is_reference(const typet &type)
Returns true if the type is a reference.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define PRECONDITION(CONDITION)
const codet & to_code(const exprt &expr)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const multi_ary_exprt & to_multi_ary_expr(const exprt &expr)
Cast an exprt to a multi_ary_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.