ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
clang_c_adjust_expr.cpp File Reference
Include dependency graph for clang_c_adjust_expr.cpp:

Functions

static bool is_shift_id (const irep_idt &id)
 The four shift ids the adjuster handles together: the C-level shl/shr the parser still emits, and the signed/unsigned ashr/lshr this conversion now produces.
static bool has_side_effect (const exprt &expr)
static bool contains_sideeffect (const exprt &expr)
static exprt * strip_typecasts (exprt &e)
static bool is_address_of_array (exprt &arg, const namespacet &ns)
static void restore_array_lvalue (exprt &arg)
static const char * float_lowering_id (const irep_idt &identifier, const side_effect_expr_function_callt &expr)
 The float functions that lower to a node taking the call's arguments unchanged, keyed by base name; null when expr is not such a call.
static bool is_popcount_builtin (const irep_idt &identifier)
void declare_argc_argv (contextt &context, const symbolt &main_symbol)
 The argc'/argv'/envp' symbols clang_c_main looks up unconditionally when main takes arguments.

Function Documentation

◆ contains_sideeffect()

bool contains_sideeffect ( const exprt & expr)
static

◆ declare_argc_argv()

void declare_argc_argv ( contextt & context,
const symbolt & main_symbol )

The argc'/argv'/envp' symbols clang_c_main looks up unconditionally when main takes arguments.

A symbol-table side effect rather than an expression rewrite, so whichever adjust pass is in charge has to make it.

◆ float_lowering_id()

const char * float_lowering_id ( const irep_idt & identifier,
const side_effect_expr_function_callt & expr )
static

The float functions that lower to a node taking the call's arguments unchanged, keyed by base name; null when expr is not such a call.

The match is on the callee's base name, which a program is free to reuse – int remainder(int, int) is an ordinary definition, and the nodes below are floating-point only (ieee_rem2t::do_simplify asserts on the type). Lower only when the call is actually shaped like the C library function, so a same-named integer function keeps its body.

◆ has_side_effect()

bool has_side_effect ( const exprt & expr)
static

◆ is_address_of_array()

bool is_address_of_array ( exprt & arg,
const namespacet & ns )
static

◆ is_popcount_builtin()

bool is_popcount_builtin ( const irep_idt & identifier)
static

◆ is_shift_id()

bool is_shift_id ( const irep_idt & id)
static

The four shift ids the adjuster handles together: the C-level shl/shr the parser still emits, and the signed/unsigned ashr/lshr this conversion now produces.

◆ restore_array_lvalue()

void restore_array_lvalue ( exprt & arg)
static

◆ strip_typecasts()

exprt * strip_typecasts ( exprt & e)
static