Go to the documentation of this file.
33 if(tmp_type.
id()==ID_array)
35 const exprt &size_expr=
38 if(size_expr.
id() == ID_infinity)
41 exprt tmp_size=size_expr;
48 error() <<
"array size '" <<
to_string(size_expr) <<
"' is not a constant"
66 if(i_code.has_value())
70 return std::move(new_code);
87 for(
const auto &c : components)
89 const typet &type = c.type();
92 !c.get_bool(ID_from_base) && type.
id() == ID_code &&
95 dtor_name = c.get_base_name();
100 INVARIANT(!dtor_name.
empty(),
"non-PODs should have a destructor");
102 cpp_namet cpp_name(dtor_name, source_location);
104 exprt member(ID_member);
105 member.
add(ID_component_cpp_name) = cpp_name;
117 return std::move(new_code);
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.
A codet representing sequential composition of program statements.
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.
The type of an expression, extends irept.
A side_effect_exprt representation of a function call side effect.
Base class for all expressions.
std::vector< componentt > componentst
const irep_idt & get(const irep_idt &name) const
const exprt & size() const
bool cpp_is_pod(const typet &type) const
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
static void make_already_typechecked(exprt &expr)
source_locationt source_location
virtual void make_constant_index(exprt &expr)
const irep_idt & id() const
nonstd::optional< T > optionalt
bool is_reference(const typet &type)
Returns true if the type is a reference.
Structure type, corresponds to C style structs.
irept & add(const irep_idt &name)
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
void add_to_operands(const exprt &expr)
Add the given argument to the end of exprt's operands.
std::string to_string(const typet &) override
source_locationt & add_source_location()
optionalt< codet > cpp_destructor(const source_locationt &source_location, const exprt &object)
bitvector_typet c_index_type()
cpp_scopet & set_scope(const irep_idt &identifier)
codet representation of an expression statement.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.