18 const exprt &struct_union,
25 if(struct_union.
get_bool(ID_C_lvalue))
26 result.
set(ID_C_lvalue,
true);
34 result.
type().
set(ID_C_constant,
true);
41 const exprt &struct_union,
49 const typet &type = comp.type();
51 if(comp.get_name()==component_name)
56 comp.get_anonymous() &&
57 (type.
id() == ID_struct_tag || type.
id() == ID_union_tag))
78 if(comp.get_name()==component_name)
83 comp.get_anonymous() &&
84 (comp.type().id() == ID_struct_tag || comp.type().id() == ID_union_tag))
bool has_component_rec(const typet &type, const irep_idt &component_name, const namespacet &ns)
static member_exprt make_member_expr(const exprt &struct_union, const struct_union_typet::componentt &component, const namespacet &ns)
exprt get_component_rec(const exprt &struct_union, const irep_idt &component_name, const namespacet &ns)
C Language Type Checking.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
typet & type()
Return the type of the expression.
bool get_bool(const irep_idt &name) const
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & id() const
Extract member of struct or union.
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
const componentst & components() const
The type of an expression, extends irept.
auto component(T &struct_expr, const irep_idt &name, const namespacet &ns) -> decltype(struct_expr.op0())
API to expression classes.
const struct_or_union_tag_typet & to_struct_or_union_tag_type(const typet &type)
Cast a typet to a struct_or_union_tag_typet.