39 if(!
lookup(identifier, check_symbol))
44 symbol.
name=identifier;
61 error() <<
"cpp_typecheckt::convert_parameter: symbol_table.move(\"" 62 << symbol.
name <<
"\") failed" <<
eom;
77 for(code_typet::parameterst::iterator
78 it=parameters.begin();
94 if(symbol.
type.
get(ID_return_type)==ID_destructor)
98 assert(symbol.
value.
id()==ID_code);
99 assert(symbol.
value.
get(ID_statement)==ID_block);
124 assert(parameters.size()>=1);
126 function_scope.
this_expr=
exprt(ID_symbol, this_parameter_expr.type());
128 ID_identifier, this_parameter_expr.get(ID_C_identifier));
172 code_typet::parameterst::const_iterator it=
175 if(it!=parameters.end() &&
176 it->get_identifier()==ID_this)
178 const typet &pointer=it->type();
191 for(; it!=parameters.end(); it++)
197 typet tmp_type=it->type();
The type of an expression.
irep_idt name
The unique identifier.
void convert_function(symbolt &symbol)
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.
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
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)
#define INVARIANT(CONDITION, REASON)
void set_base_name(const irep_idt &name)
symbol_tablet & symbol_table
const irep_idt & id() const
const irep_idt & get_base_name() const
virtual bool move(symbolt &symbol, symbolt *&new_symbol) override
Move a symbol into the symbol table.
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.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
bool has_operands() const
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)
mstreamt & result() const
Base class for all expressions.
const parameterst & parameters() const
irep_idt base_name
Base (non-scoped) name.
cpp_scopet & current_scope()
std::string to_string(const string_constraintt &expr)
Used for debug printing.
const source_locationt & source_location() const
const codet & to_code(const exprt &expr)
const typet & subtype() const
const typet & return_type() const
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See namespace_baset::lookup().
void set(const irep_namet &name, const irep_idt &value)