135 ctor.add_to_operands(std::move(decl));
136 ctor.add_source_location()=source_location;
174 sub.push_back(
cppcomp.as_type());
182 decl0.add_source_location()=source_location;
208 mem_init.add_source_location()=source_location;
219 for(
const auto &
mem_c : components)
261 mem_init.add_source_location()=source_location;
266 memberexpr.add_source_location()=source_location;
295 cpctor.add_source_location()=source_location;
333 args_decl.add_source_location()=source_location;
409 declarator.
value() = std::move(block);
434 bool has_template_args=
member_name.has_template_args();
436 if(has_template_args)
444 for(
const auto &
b : bases)
468 for(
const auto &
c : components)
470 if(
c.get_base_name() != base_name)
494 for(
const auto &
b : bases)
515 for(
const auto &
b : bases)
532 error() <<
"invalid initializer '" << base_name <<
"'" <<
eom;
560 std::list<irep_idt>
vbases;
583 cpp_namet(
"@most_derived").as_expr(), std::move(block));
608 bool has_template_args=
member_name.has_template_args();
610 if(!has_template_args)
617 for(
const auto &
c : components)
620 c.get_base_name() == base_name &&
c.type().id() !=
ID_code &&
674 for(
const auto &
c : components)
741 error() <<
"reference must be explicitly initialized" <<
eom;
781 if(parameters.size() < 2)
799 for(std::size_t i=2; i<parameters.size(); i++)
801 if(parameters[i].default_value().is_nil())
822 if(
component.get_base_name() !=
"operator=")
reference_typet reference_type(const typet &subtype)
pointer_typet pointer_type(const typet &subtype)
bitvector_typet c_index_type()
Operator to return the address of an object.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
static void make_already_typechecked(exprt &expr)
A codet representing sequential composition of program statements.
void add(const codet &code)
codet representation of an expression statement.
A codet representing an assignment in the program.
codet representation of an if-then-else statement.
goto_instruction_codet representation of a "return from a function" statement.
std::vector< parametert > parameterst
Data structure for representing an arbitrary statement in a program.
const exprt & as_expr() const
const typet & as_type() const
void default_assignop(const symbolt &symbol, cpp_declarationt &cpctor)
Generate declaration of the implicit default assignment operator.
void typecheck_type(typet &) override
void full_member_initialization(const struct_union_typet &struct_union_type, irept &initializers)
Build the full initialization list of the constructor.
bool cpp_is_pod(const typet &type) const
void default_cpctor(const symbolt &, cpp_declarationt &cpctor) const
Generate code for implicit default copy constructor.
bool find_assignop(const symbolt &symbol) const
void get_virtual_bases(const struct_typet &type, std::list< irep_idt > &vbases) const
void check_member_initializers(const struct_typet::basest &bases, const struct_typet::componentst &components, const irept &initializers)
Check a constructor initialization-list.
void default_assignop_value(const symbolt &symbol, cpp_declaratort &declarator)
Generate code for the implicit default assignment operator.
bool find_cpctor(const symbolt &symbol) const
void default_ctor(const source_locationt &source_location, const irep_idt &base_name, cpp_declarationt &ctor) const
Generate code for implicit default constructors.
Operator to dereference a pointer.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
void copy_to_operands(const exprt &expr)
Copy the given argument to the end of exprt's operands.
typet & type()
Return the type of the expression.
const source_locationt & source_location() const
source_locationt & add_source_location()
There are a large number of kinds of tree structured or tree-like data in CPROVER.
void set(const irep_idt &name, const irep_idt &value)
void move_to_sub(irept &irep)
irept & add(const irep_idt &name)
source_locationt source_location
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
A side_effect_exprt that performs an assignment.
void set_function(const irep_idt &function)
Structure type, corresponds to C style structs.
std::vector< baset > basest
Base type for structs and unions.
std::vector< componentt > componentst
typet type
Type of symbol.
irep_idt name
The unique identifier.
irep_idt irep_idt base_name
Name of module the symbol belongs to.
The type of an expression, extends irept.
const source_locationt & source_location() const
cpp_namet & to_cpp_name(irept &cpp_name)
C++ Language Type Checking.
static void copy_array(const source_locationt &source_location, const irep_idt &member_base_name, mp_integer i, const irep_idt &arg_name, exprt &block)
Generate code to copy the member.
static void copy_member(const source_locationt &source_location, const irep_idt &member_base_name, const irep_idt &arg_name, exprt &block)
Generate code to copy the member.
static void copy_parent(const source_locationt &source_location, const irep_idt &parent_base_name, const irep_idt &arg_name, exprt &block)
Generate code to copy the parent.
const std::string & id2string(const irep_idt &d)
API to expression classes for Pointers.
bool is_reference(const typet &type)
Returns true if the type is a reference.
const reference_typet & to_reference_type(const typet &type)
Cast a typet to a reference_typet.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
#define CHECK_RETURN(CONDITION)
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define PRECONDITION(CONDITION)
auto component(T &struct_expr, const irep_idt &name, const namespacet &ns) -> decltype(struct_expr.op0())
const multi_ary_exprt & to_multi_ary_expr(const exprt &expr)
Cast an exprt to a multi_ary_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const type_with_subtypest & to_type_with_subtypes(const typet &type)
const type_with_subtypet & to_type_with_subtype(const typet &type)