39 if(tmp_type.
id()==ID_array)
41 const exprt &size_expr=
44 if(size_expr.
id()==
"infinity")
51 exprt tmp_size=size_expr;
59 <<
"' is not a constant" <<
eom;
63 new_code.
type().
id(ID_code);
96 for(struct_typet::componentst::const_iterator
97 it=components.begin();
101 const typet &type=it->type();
103 if(!it->get_bool(ID_from_base) &&
104 type.
id()==ID_code &&
105 type.
find(ID_return_type).
id()==ID_destructor)
107 dtor_name=it->get(ID_base_name);
113 assert(dtor_name!=
"");
115 irept cpp_name(ID_cpp_name);
117 cpp_name.
get_sub().back().set(ID_identifier, dtor_name);
118 cpp_name.
get_sub().back().set(ID_C_source_location, source_location);
120 exprt member(ID_member);
121 member.
add(ID_component_cpp_name) = cpp_name;
The type of an expression.
void typecheck_side_effect_function_call(side_effect_expr_function_callt &expr)
void copy_to_operands(const exprt &expr)
std::vector< componentt > componentst
void move_to_operands(exprt &expr)
void already_typechecked(irept &irep)
const componentst & components() const
static mstreamt & eom(mstreamt &m)
codet cpp_destructor(const source_locationt &source_location, const exprt &object)
const irep_idt & id() const
void elaborate_class_template(const typet &type)
elaborate class template instances
source_locationt source_location
bool cpp_is_pod(const typet &type) const
bool is_reference(const typet &type)
TO_BE_DOCUMENTED.
const irep_idt & get(const irep_namet &name) const
const exprt & size() const
Base class for tree-like data structures with sharing.
C++ Language Type Checking.
const typet & follow(const typet &) const
bitvector_typet index_type()
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
cpp_scopet & set_scope(const irep_idt &identifier)
A function call side effect.
void set_statement(const irep_idt &statement)
const array_typet & to_array_type(const typet &type)
Cast a generic typet to an array_typet.
Base class for all expressions.
virtual void make_constant_index(exprt &expr)
irept & add(const irep_namet &name)
virtual std::string to_string(const typet &type)
source_locationt & add_source_location()
A statement in a programming language.
const irept & find(const irep_namet &name) const