28 if(type.
id()==ID_signedbv ||
29 type.
id()==ID_unsignedbv ||
30 type.
id()==ID_floatbv ||
31 type.
id()==ID_fixedbv ||
37 std::size_t bytes=bits/8;
42 else if(type.
id()==ID_incomplete_c_enum)
47 else if(type.
id()==ID_c_enum)
52 else if(type.
id()==ID_c_enum_tag)
57 else if(type.
id()==ID_pointer)
64 std::size_t bytes=bits/8;
69 else if(type.
id()==ID_bool)
75 else if(type.
id()==ID_array)
77 const exprt &size_expr=
110 else if(type.
id()==ID_struct)
119 for(
const auto &comp : components)
123 if(comp.get_bool(ID_is_type))
126 else if(sub_type.
id()==ID_code)
129 else if(sub_type.
id()==ID_c_bit_field)
146 if(bit_field_width!=0)
149 else if(type.
id()==ID_union)
157 for(
const auto &comp : components)
159 if(comp.get_bool(ID_is_type) || comp.type().id()==ID_code)
162 const typet &sub_type=comp.type();
166 if(sub_type.
id()==ID_c_bit_field)
189 else if(type.
id()==ID_symbol)
193 else if(type.
id()==ID_empty)
198 else if(type.
id()==ID_vector)
201 const exprt &size_expr=
226 else if(type.
id()==ID_complex)
264 for(
const auto &comp : components)
266 if(comp.get_name()==component_name)
269 if(bit_field_width!=0)
274 if(comp.get_bool(ID_is_type))
279 if(sub_type.
id()==ID_code)
282 else if(sub_type.
id()==ID_c_bit_field)
306 exprt tmp=c_sizeof_inst(src);
The type of an expression.
const typet & follow(const typet &src) const
struct configt::ansi_ct ansi_c
A generic base class for relations, i.e., binary predicates.
const union_typet & to_union_type(const typet &type)
Cast a generic typet to a union_typet.
void copy_to_operands(const exprt &expr)
std::vector< componentt > componentst
void move_to_operands(exprt &expr)
const componentst & components() const
The trinary if-then-else operator.
unsignedbv_typet size_type()
bool get_bool(const irep_namet &name) const
virtual exprt sizeof_rec(const typet &type)
const typet & follow_tag(const union_tag_typet &src) const
const irep_idt & id() const
exprt c_sizeof(const typet &src, const namespacet &ns)
const array_typet & to_array_type(const typet &type)
Cast a generic typet to an array_typet.
const c_enum_tag_typet & to_c_enum_tag_type(const typet &type)
Cast a generic typet to a c_enum_tag_typet.
API to expression classes.
const exprt & size() const
const exprt & size() const
const c_bit_field_typet & to_c_bit_field_type(const typet &type)
Cast a generic typet to a c_bit_field_typet.
std::size_t get_width() const
bool c_implicit_typecast(exprt &expr, const typet &dest_type, const namespacet &ns)
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
Base class for all expressions.
const typet & subtype() const
const vector_typet & to_vector_type(const typet &type)
Cast a generic typet to a vector_typet.
exprt c_offsetof(const struct_typet &type, const irep_idt &component_name)
bool simplify(exprt &expr, const namespacet &ns)
const bitvector_typet & to_bitvector_type(const typet &type)
Cast a generic typet to a bitvector_typet.