34 const typet &target_type,
42 if(ptr_base.
id()!=ID_struct)
63 if(ns.
follow(first_field_type)==target_type)
81 if(ptr.
type()==target_type)
94 while(bare_ptr.
id()==ID_typecast)
97 bare_ptr.
type().
id() == ID_pointer,
98 "Non-pointer in make_clean_pointer_cast?");
104 bare_ptr.
type().
id() == ID_pointer,
105 "Non-pointer in make_clean_pointer_cast?");
107 if(bare_ptr.
type()==target_type)
110 exprt superclass_ptr=bare_ptr;
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 typet & follow(const typet &) const
Resolve type symbol to the type it points to.
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_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.