Go to the documentation of this file.
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();
98 assert(symbol.
value.
id()==ID_code);
99 assert(symbol.
value.
get(ID_statement)==ID_block);
124 assert(parameters.size()>=1);
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();
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 set_identifier(const irep_idt &identifier)
Base class for all expressions.
irep_idt base_name
Base (non-scoped) name.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
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 lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
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
codet dtor(const symbolt &symb)
produces destructor code for a class object
symbol_tablet & symbol_table
const irep_idt & id() const
irep_idt function_identifier(const typet &type)
for function overloading
const parameterst & parameters() const
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.
void set(const irep_namet &name, const irep_idt &value)
const typet & return_type() const
virtual void start_typecheck_code()
irep_idt module
Name of module the symbol belongs to.
void convert_parameter(const irep_idt &mode, code_typet::parametert ¶meter)
const source_locationt & source_location() const
irep_idt name
The unique identifier.
cpp_scopet & set_scope(const irep_idt &identifier)
void convert_parameters(const irep_idt &mode, code_typet &function_type)