1#ifndef ESBMC_CLANG_C_FRONTEND_CLANG_C_ADJUST_GUARDS_H
2#define ESBMC_CLANG_C_FRONTEND_CLANG_C_ADJUST_GUARDS_H
15 return is_add2t(expr) || is_sub2t(expr) || is_mul2t(expr) || is_div2t(expr);
28 return is_binary_arith(expr) || is_modulus2t(expr) || is_bitand2t(expr) ||
29 is_bitor2t(expr) || is_bitxor2t(expr);
38 return is_shl2t(expr) || is_ashr2t(expr) || is_lshr2t(expr);
46 return is_code_ifthenelse2t(expr) || is_code_while2t(expr) ||
47 is_code_dowhile2t(expr) || is_code_for2t(expr);
54 return is_equality2t(expr) || is_notequal2t(expr) || is_lessthan2t(expr) ||
55 is_lessthanequal2t(expr) || is_greaterthan2t(expr) ||
56 is_greaterthanequal2t(expr);
63 return is_and2t(expr) || is_or2t(expr) || is_not2t(expr);
71 return is_pointer_type(type) &&
80 if (!is_sideeffect2t(expr))
83 switch (to_sideeffect2t(expr).kind)
85 case sideeffect2t::allockind::preincrement:
86 case sideeffect2t::allockind::postincrement:
87 case sideeffect2t::allockind::predecrement:
88 case sideeffect2t::allockind::postdecrement:
101 if (!is_sideeffect2t(expr))
104 switch (to_sideeffect2t(expr).kind)
106 case sideeffect2t::allockind::cpp_new:
107 case sideeffect2t::allockind::cpp_new_arr:
108 case sideeffect2t::allockind::cpp_delete:
109 case sideeffect2t::allockind::cpp_delete_array:
120 return is_code_function_call2t(expr) || is_sideeffect2t(expr);
139 return is_typecast2t(expr) && !to_typecast2t(expr).derived_to_base.empty();
145 return is_typecast2t(expr) && to_typecast2t(expr).base_to_derived;
bool is_increment_sideeffect(const expr2tc &expr)
x++, ++x, x--, --x.
Definition clang_c_adjust_guards.h:78
bool is_binary_arith(const expr2tc &expr)
The guards the IREP2 adjust arm tables dispatch on.
Definition clang_c_adjust_guards.h:13
bool is_call_site(const expr2tc &expr)
Both spellings of a call: a bare f(x); statement is a sideeffect2t of kind function_call rather than ...
Definition clang_c_adjust_guards.h:118
bool is_reference_type(const type2tc &type)
A C++ reference: IREP2 spells one as a pointer carrying a reference kind (scope-clang-cpp-irep2....
Definition clang_c_adjust_guards.h:69
bool is_derived_to_base_cast(const expr2tc &expr)
A cast the frontend marked as a derived->base conversion it could not route through a "@base@" compon...
Definition clang_c_adjust_guards.h:137
bool is_arith_or_bitwise(const expr2tc &expr)
The operators clang_c_adjust routes through adjust_expr_binary_arithmetic.
Definition clang_c_adjust_guards.h:26
bool is_promotable_unary(const expr2tc &expr)
The unary operators promote_unary_bool_operand claims: the complement of is_complex_unary within the ...
Definition clang_c_adjust_guards.h:129
bool is_statement_with_condition(const expr2tc &expr)
The statements whose controlling expression clang_c_adjust converts to bool (adjust_ifthenelse,...
Definition clang_c_adjust_guards.h:44
bool is_alloc_sideeffect(const expr2tc &expr)
An allocation side effect: new, new[], delete, delete[].
Definition clang_c_adjust_guards.h:99
bool is_base_to_derived_cast(const expr2tc &expr)
The mirror: a downcast whose operand points at a base subobject (#1866).
Definition clang_c_adjust_guards.h:143
bool is_short_circuit(const expr2tc &expr)
The short-circuit operators, whose operands goto_convert's lowering rejects unless they are boolean.
Definition clang_c_adjust_guards.h:61
bool is_relational(const expr2tc &expr)
The comparisons clang_c_adjust routes through adjust_expr_rel.
Definition clang_c_adjust_guards.h:52
bool is_complex_unary(const expr2tc &expr)
-z and GNU ~z (conjugation) are the only unary operators clang leaves carrying a complex type.
Definition clang_c_adjust_guards.h:20
bool is_shift(const expr2tc &expr)
The shifts clang_c_adjust routes through adjust_expr_shifts.
Definition clang_c_adjust_guards.h:36
const type2tc type
Type of this expr.
Definition irep2.h:910
irep_container< type2t > type2tc
Definition irep2.h:430
irep_container< expr2t > expr2tc
Definition irep2.h:431
@ NONE
Definition irep2_type.h:557
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
Definition std_types.h:460
bool is_complex_type(const typet &type)
Definition type_handler.h:39