18 const exprt &struct_union,
25 if(struct_union.
get_bool(ID_C_lvalue))
26 result.
set(ID_C_lvalue,
true);
32 if(result.get_bool(ID_C_constant) ||
35 result.
set(ID_C_constant,
true);
41 const exprt &struct_union,
51 for(
const auto &comp : components)
55 if(comp.get_name()==component_name)
59 else if(comp.get_anonymous() &&
60 (type.
id()==ID_struct || type.
id()==ID_union))
83 for(
const auto &comp : components)
85 if(comp.get_name()==component_name)
89 else if(comp.get_anonymous())
const irep_idt & get_name() const
The type of an expression.
static exprt make_member_expr(const exprt &struct_union, const struct_union_typet::componentt &component, const namespacet &ns)
std::vector< componentt > componentst
const componentst & components() const
bool has_component_rec(const typet &type, const irep_idt &component_name, const namespacet &ns)
bool get_bool(const irep_namet &name) const
exprt get_component_rec(const exprt &struct_union, const irep_idt &component_name, const namespacet &ns)
Extract member of struct or union.
const irep_idt & id() const
API to expression classes.
const typet & follow(const typet &) const
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Base type of C structs and unions, and C++ classes.
Base class for all expressions.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
void set(const irep_namet &name, const irep_idt &value)
C Language Type Checking.