Go to the documentation of this file.
27 goto_program(goto_program),
76 const typet &op_type=op.type();
123 const typet *target_type,
const typet *source_type)
const
125 while(target_type->
id()==ID_pointer)
127 bool direct_subtypes_at_least_as_const=
132 if(!direct_subtypes_at_least_as_const)
135 target_type=&target_type->
subtype();
136 source_type=&source_type->
subtype();
163 const typet &type_more_const,
const typet &type_compare)
const
165 return !type_compare.
get_bool(ID_C_constant) ||
166 type_more_const.
get_bool(ID_C_constant);
const typet & subtype() const
The type of an expression, extends irept.
std::pair< bool, source_locationt > operator()() const
A naive analysis to look for casts that remove const-ness from pointers.
bool does_expr_lose_const(const exprt &expr) const
Search the expression tree to look for any children that have the same base type, but a less strict c...
Base class for all expressions.
bool does_type_preserve_const_correctness(const typet *target_type, const typet *source_type) const
A recursive check that handles when assigning a source value to a target, is the assignment a loss of...
Defines typet, type_with_subtypet and type_with_subtypest.
bool is_type_at_least_as_const_as(const typet &type_more_const, const typet &type_compare) const
A simple check to check the type_more_const is at least as const as type compare.
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.
bool get_bool(const irep_namet &name) const
codet code
Do not read or modify directly – use get_X() instead.
bool base_type_eq(const typet &type1, const typet &type2, const namespacet &ns)
Check types for equality across all levels of hierarchy.
const source_locationt & find_source_location() const
Get a source_locationt from the expression or from its operands (non-recursively).
does_remove_constt(const goto_programt &goto_program, const namespacet &ns)
A naive analysis to look for casts that remove const-ness from pointers.
const irep_idt & id() const
instructionst instructions
The list of instructions in the goto program.
const code_assignt & to_code_assign(const codet &code)
A generic container class for the GOTO intermediate representation of one function.
const goto_programt & goto_program
A codet representing an assignment in the program.
This class represents an instruction in the GOTO intermediate representation.