39 symbol.
name=identifier;
55 error() <<
"cpp_typecheckt::convert_parameter: symbol_table.move(\"" 56 << symbol.
name <<
"\") failed" <<
eom;
71 for(code_typet::parameterst::iterator
72 it=parameters.begin();
88 if(symbol.
type.
get(ID_return_type)==ID_destructor)
92 assert(symbol.
value.
id()==ID_code);
93 assert(symbol.
value.
get(ID_statement)==ID_block);
113 assert(parameters.size()>=1);
115 function_scope.
this_expr=
exprt(ID_symbol, this_parameter_expr.type());
117 ID_identifier, this_parameter_expr.get(ID_C_identifier));
161 code_typet::parameterst::const_iterator it=
164 if(it!=parameters.end() &&
165 it->get_identifier()==ID_this)
167 const typet &pointer=it->type();
180 for(; it!=parameters.end(); it++)
186 typet tmp_type=it->type();
The type of an expression.
irep_idt name
The unique identifier.
void convert_function(symbolt &symbol)
virtual bool lookup(const irep_idt &name, const symbolt *&symbol) const
codet dtor(const symbolt &symb)
produces destructor code for a class object
const std::string & id2string(const irep_idt &d)
irep_idt mode
Language mode.
void copy_to_operands(const exprt &expr)
std::vector< parametert > parameterst
virtual void typecheck_code(codet &code)
exprt value
Initial value of symbol.
cpp_idt & put_into_scope(const symbolt &symbol, cpp_scopet &scope, bool is_friend=false)
void convert_parameter(const irep_idt &mode, code_typet::parametert ¶meter)
irep_idt module
Name of module the symbol belongs to.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
static mstreamt & eom(mstreamt &m)
bool get_bool(const irep_namet &name) const
const typet & template_subtype(const typet &type)
void set_base_name(const irep_idt &name)
symbol_tablet & symbol_table
const irep_idt & id() const
const irep_idt & get_base_name() const
source_locationt source_location
void convert_parameters(const irep_idt &mode, code_typet &function_type)
bool is_reference(const typet &type)
TO_BE_DOCUMENTED.
const irep_idt & get(const irep_namet &name) const
std::string cpp_type2name(const typet &type)
C++ Language Type Checking.
bool move(symbolt &symbol, symbolt *&new_symbol)
Move a symbol into the symbol table.
virtual void start_typecheck_code()
cpp_scopet & set_scope(const irep_idt &identifier)
irep_idt function_identifier(const typet &type)
for function overloading
typet type
Type of symbol.
source_locationt location
Source code location of definition of symbol.
void set_identifier(const irep_idt &identifier)
Base class for all expressions.
const parameterst & parameters() const
irep_idt base_name
Base (non-scoped) name.
cpp_scopet & current_scope()
const source_locationt & source_location() const
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
const codet & to_code(const exprt &expr)
const typet & subtype() const
const typet & return_type() const
void set(const irep_namet &name, const irep_idt &value)