Go to the documentation of this file.
36 if(tmp_type.
id()==ID_array)
38 const exprt &size_expr=
41 if(size_expr.
id() == ID_infinity)
44 exprt tmp_size=size_expr;
52 <<
"' is not a constant" <<
eom;
56 new_code.
type().
id(ID_code);
70 if(i_code.has_value())
89 for(
const auto &c : components)
91 const typet &type = c.type();
94 !c.get_bool(ID_from_base) && type.
id() == ID_code &&
97 dtor_name = c.get_base_name();
103 assert(dtor_name!=
"");
105 cpp_namet cpp_name(dtor_name, source_location);
107 exprt member(ID_member);
108 member.
add(ID_component_cpp_name) = cpp_name;
void copy_to_operands(const exprt &expr)
Copy the given argument to the end of exprt's operands.
const componentst & components() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void move_to_operands(exprt &expr)
Move the given argument to the end of exprt's operands.
void elaborate_class_template(const typet &type)
elaborate class template instances
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
void already_typechecked(irept &irep)
The type of an expression, extends irept.
A side_effect_exprt representation of a function call side effect.
irept & add(const irep_namet &name)
Base class for all expressions.
std::vector< componentt > componentst
bitvector_typet index_type()
const exprt & size() const
bool cpp_is_pod(const typet &type) const
typet & type()
Return the type of the expression.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
void typecheck_side_effect_function_call(side_effect_expr_function_callt &) override
source_locationt source_location
virtual void make_constant_index(exprt &expr)
const irep_idt & id() const
nonstd::optional< T > optionalt
Structure type, corresponds to C style structs.
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
bool is_reference(const typet &type)
Returns true if the type is a reference.
const irep_idt & get(const irep_namet &name) const
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
std::string to_string(const typet &) override
void set_statement(const irep_idt &statement)
source_locationt & add_source_location()
optionalt< codet > cpp_destructor(const source_locationt &source_location, const exprt &object)
cpp_scopet & set_scope(const irep_idt &identifier)
codet representation of an expression statement.
Data structure for representing an arbitrary statement in a program.