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);
The type of an expression.
bool base_type_eq(const typet &type1, const typet &type2, const namespacet &ns)
bool get_bool(const irep_namet &name) const
const goto_programt & goto_program
This class represents an instruction in the GOTO intermediate representation.
const code_assignt & to_code_assign(const codet &code)
const irep_idt & id() const
const source_locationt & find_source_location() const
std::pair< bool, source_locationt > operator()() const
A naive analysis to look for casts that remove const-ness from pointers.
instructionst instructions
The list of instructions in the goto program.
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...
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...
A generic container class for the GOTO intermediate representation of one function.
Base class for all expressions.
goto_programt & goto_program
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. ...
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 typet & subtype() const