Go to the documentation of this file.
22 return ptr.
id()==ID_address_of
32 const typet &target_type,
35 assert(ptr.
type().
id()==ID_pointer);
40 if(ptr_base.
id()!=ID_struct)
61 if(ns.
follow(first_field_type)==target_type)
71 if(in.
id()==ID_typecast)
73 assert(in.
type().
id()==ID_pointer);
94 if(ptr.
type()==target_type)
104 while(bare_ptr.
id()==ID_typecast)
107 bare_ptr.
type().
id()==ID_pointer &&
108 "Non-pointer in make_clean_pointer_cast?");
110 bare_ptr=bare_ptr.
op0();
114 bare_ptr.
type().
id()==ID_pointer &&
115 "Non-pointer in make_clean_pointer_cast?");
117 if(bare_ptr.
type()==target_type)
120 exprt superclass_ptr=bare_ptr;
122 return superclass_ptr;
const componentst & components() const
#define PRECONDITION(CONDITION)
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 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.
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 ...
static const exprt & look_through_casts(const exprt &in)