24 const exprt &const_dest(dest);
34 if(dest.
id() == ID_side_effect)
36 if(
auto call = expr_try_dynamic_cast<side_effect_expr_function_callt>(dest))
47 for(
auto &arg : call->arguments())
62 else if(dest.
id() == ID_address_of)
90 const exprt &e = it->second;
94 previous_source_location.is_not_nil(),
95 "front-ends should construct symbol expressions with source locations",
97 if(e.
type().
id() != ID_array && e.
type().
id() != ID_code)
103 static_cast<exprt &
>(s) = e;
Operator to return the address of an object.
bool replace_symbol_expr(symbol_exprt &dest) const override
bool replace(exprt &dest) const override
const typet & return_type() const
Base class for all expressions.
source_locationt & add_source_location()
const source_locationt & source_location() const
typet & type()
Return the type of the expression.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
const irep_idt & id() const
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.
virtual bool replace(exprt &dest) const
bool have_to_replace(const exprt &dest) const
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
Semantic type conversion.
static exprt conditional_cast(const exprt &expr, const typet &type)
The type of an expression, extends irept.
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 DATA_INVARIANT_WITH_DIAGNOSTICS(CONDITION, REASON,...)
API to expression classes.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.