34 const typet &target_type,
41 if(ptr_base.
id() != ID_struct_tag)
62 const typet &underlying_type =
63 first_field_type.
id() == ID_struct_tag
66 if(underlying_type == target_type)
84 if(ptr.
type()==target_type)
95 while(bare_ptr.
id()==ID_typecast)
98 bare_ptr.
type().
id() == ID_pointer,
99 "Non-pointer in make_clean_pointer_cast?");
105 bare_ptr.
type().
id() == ID_pointer,
106 "Non-pointer in make_clean_pointer_cast?");
108 if(bare_ptr.
type()==target_type)
111 exprt superclass_ptr=bare_ptr;
116 const typet &target_base =
Operator to return the address of an object.
Operator to dereference a pointer.
Base class for all expressions.
typet & type()
Return the type of the expression.
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...
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
const typet & base_type() const
The type of the data what we point to.
Structure type, corresponds to C style structs.
const componentst & components() const
Semantic type conversion.
static exprt conditional_cast(const exprt &expr, const typet &type)
The type of an expression, extends irept.
const exprt & skip_typecast(const exprt &expr)
find the expression nested inside typecasts, if any
Deprecated expression utility functions.
bool find_superclass_with_type(exprt &ptr, const typet &target_type, const namespacet &ns)
static exprt clean_deref(const exprt &ptr)
dereference pointer expression
exprt make_clean_pointer_cast(const exprt &rawptr, const pointer_typet &target_type, const namespacet &ns)
empty_typet java_void_type()
API to expression classes for Pointers.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
API to expression classes.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.