Go to the documentation of this file.
33 const typet &target_type,
36 assert(ptr.
type().
id()==ID_pointer);
41 if(ptr_base.
id()!=ID_struct)
62 if(ns.
follow(first_field_type)==target_type)
72 if(in.
id()==ID_typecast)
74 assert(in.
type().
id()==ID_pointer);
95 if(ptr.
type()==target_type)
106 while(bare_ptr.
id()==ID_typecast)
109 bare_ptr.
type().
id()==ID_pointer &&
110 "Non-pointer in make_clean_pointer_cast?");
116 bare_ptr.
type().
id()==ID_pointer &&
117 "Non-pointer in make_clean_pointer_cast?");
119 if(bare_ptr.
type()==target_type)
122 exprt superclass_ptr=bare_ptr;
const componentst & components() const
static exprt conditional_cast(const exprt &expr, const typet &type)
const typet & subtype() const
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
The type of an expression, extends irept.
Operator to dereference a pointer.
Base class for all expressions.
exprt make_clean_pointer_cast(const exprt &rawptr, const pointer_typet &target_type, const namespacet &ns)
bool find_superclass_with_type(exprt &ptr, const typet &target_type, const namespacet &ns)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
typet & type()
Return the type of the expression.
static exprt clean_deref(const exprt &ptr)
dereference pointer expression
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
#define PRECONDITION(CONDITION)
const irep_idt & id() const
Extract member of struct or union.
Structure type, corresponds to C style structs.
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
Operator to return the address of an object.
Semantic type conversion.
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
empty_typet java_void_type()
API to expression classes.
static const exprt & look_through_casts(const exprt &in)