|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
clang C++ adjuster class for: More...
#include <clang_cpp_adjust.h>
Public Member Functions | |
| clang_cpp_adjust (contextt &_context) | |
| virtual | ~clang_cpp_adjust ()=default |
| void | adjust_symbol (symbolt &symbol) override |
| methods for symbol adjustment | |
| void | adjust_code (codet &code) override |
| methods for code (codet) adjustment and other IRs derived from codet | |
| void | adjust_while (codet &code) override |
| void | adjust_switch (codet &code) override |
| void | adjust_for (codet &code) override |
| void | adjust_ifthenelse (codet &code) override |
| void | adjust_decl_block (codet &code) override |
| void | adjust_catch (codet &code) |
| void | adjust_switch_case_ops (exprt &stmt, const typet &switch_type) |
| void | adjust_member (member_exprt &expr) override |
| methods for expression (exprt) adjustment and other IRs derived from exprt | |
| void | adjust_side_effect (side_effect_exprt &expr) override |
| void | adjust_side_effect_assign (side_effect_exprt &expr) |
| void | adjust_side_effect_function_call (side_effect_expr_function_callt &expr) override |
| void | adjust_function_call_arguments (side_effect_expr_function_callt &expr) override |
| void | adjust_reference (exprt &expr) override |
| void | adjust_new (exprt &expr) |
| void | adjust_cpp_delete (side_effect_exprt &expr) |
| void | adjust_cpp_member (member_exprt &expr) |
| void | adjust_cpp_pseudo_destructor_call (exprt &expr) |
| Adjusts a C++ pseudo-destructor call expression. | |
| void | adjust_side_effect_throw (side_effect_exprt &expr) |
| exprt | gen_vptr_init_rhs (const struct_union_typet::componentt &comp, const code_typet &ctor_type) |
| methods for implicit GOTO code generation | |
| void | convert_expression_to_code (exprt &expr) |
| ancillary methods to support the expr/code adjustments above | |
| void | convert_reference (exprt &expr) |
| void | convert_ref_to_deref_symbol (exprt &expr) |
| void | convert_lvalue_ref_to_deref_sideeffect (exprt &expr) |
| void | align_se_function_call_return_type (exprt &f_op, side_effect_expr_function_callt &expr) override |
| ancillary methods to support the expr/code adjustments above | |
| void | convert_exception_id (const typet &type, const std::string &suffix, std::vector< irep_idt > &ids, bool is_catch=false) |
| void | gen_implicit_union_copy_move_constructor (symbolt &symbol) |
| Generates an implicit copy and move constructor for a symbol if it is a union. | |
| Public Member Functions inherited from clang_c_adjust | |
| clang_c_adjust (contextt &_context) | |
| virtual | ~clang_c_adjust ()=default |
| bool | adjust () |
| void | set_irep2_owns_arms () |
| Hand the index rewrite to the IREP2 adjuster. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from clang_c_adjust | |
| static exprt | declare_gcc_polymorphic_builtin (const symbol_exprt &callee, const exprt::operandst &arguments, const locationt &call_location, contextt &context) |
Declare the concrete instance of the GCC __sync_* / C11 __c11_atomic_* polymorphic builtin that callee and arguments select, adding its parameter symbols and its synthesised body to context on first use. | |
| Protected Member Functions inherited from clang_c_adjust | |
| bool | has_single_arithmetic_argument (const side_effect_expr_function_callt &expr) const |
| methods for symbol adjustment | |
| bool | shadows_user_definition (const irep_idt &identifier, const exprt &f_op) const |
| True when a name-matched builtin lowering would discard a definition the program supplies, in which case the definition wins. | |
| void | adjust_type (typet &type) |
| methods for type (typet) adjustment | |
| void | adjust_expr (exprt &expr) |
| methods for expression (exprt) adjustment and other IRs derived from exprt | |
| void | adjust_base_to_derived (exprt &expr) |
| void | adjust_derived_to_base (exprt &expr, const irep_idt &base_id) |
| void | adjust_call_argument (exprt &arg) |
| void | adjust_struct (exprt &expr) |
| void | adjust_ptr_mem (exprt &expr) |
| void | adjust_side_effect_assignment (exprt &expr) |
| void | adjust_side_effect_statement_expression (side_effect_exprt &expr) |
| void | adjust_expr_binary_arithmetic (exprt &expr) |
| bool | lower_complex_binary_arithmetic (exprt &expr) |
| Rewrite a binary arithmetic expression over complex operands into the component-level form, in place. | |
| bool | lower_complex_compound_assignment (exprt &expr) |
| A compound assignment over a complex operand has to be expanded here. | |
| void | adjust_expr_unary_complex (exprt &expr) |
| void | bind_sideeffect_operands (exprt &expr, code_blockt &block) |
| void | finish_complex_lowering (exprt &expr, exprt &result, code_blockt &block) |
| void | adjust_expr_shifts (exprt &expr) |
| void | adjust_expr_unary_boolean (exprt &expr) |
| void | adjust_expr_binary_boolean (exprt &expr) |
| virtual void | adjust_expr_rel (exprt &expr) |
| void | adjust_float_arith (exprt &expr) |
| void | adjust_index (index_exprt &index) |
| void | adjust_dereference (exprt &deref) |
| void | adjust_address_of (exprt &expr) |
| void | adjust_sizeof (exprt &expr) |
| void | adjust_symbol (exprt &expr) |
| void | adjust_comma (exprt &expr) |
| void | adjust_builtin_va_arg (exprt &expr) |
| void | do_special_functions (side_effect_expr_function_callt &expr) |
| void | adjust_operands (exprt &expr) |
| void | adjust_if (exprt &expr) |
| void | adjust_assign (codet &code) |
| void | adjust_decl (codet &code) |
| Static Protected Member Functions inherited from clang_c_adjust | |
| static exprt | is_gcc_polymorphic_builtin (const irep_idt &identifier, const exprt::operandst &arguments) |
| static code_blockt | instantiate_gcc_polymorphic_builtin (const irep_idt &identifier, const symbol_exprt &function_symbol, contextt &context) |
| Protected Attributes inherited from clang_c_adjust | |
| bool | irep2_owns_arms = false |
| contextt & | context |
| namespacet | ns |
| symbol_generator | tmp_symbol {"clang_c_adjust::"} |
clang C++ adjuster class for:
Some ancillary methods to support the expr/code adjustments above
|
explicit |
|
virtualdefault |
| void clang_cpp_adjust::adjust_catch | ( | codet & | code | ) |
|
overridevirtual |
methods for code (codet) adjustment and other IRs derived from codet
Reimplemented from clang_c_adjust.
| void clang_cpp_adjust::adjust_cpp_delete | ( | side_effect_exprt & | expr | ) |
| void clang_cpp_adjust::adjust_cpp_member | ( | member_exprt & | expr | ) |
| void clang_cpp_adjust::adjust_cpp_pseudo_destructor_call | ( | exprt & | expr | ) |
Adjusts a C++ pseudo-destructor call expression.
This method is responsible for handling adjustments specific to pseudo-destructor calls in C++ code. The converter has generated a function call to the pseudo-destructor, but there is nothing to actually call. Instead, only the base object of the destructor call is evaluted.
| expr | The expression representing the pseudo-destructor call |
|
overridevirtual |
Reimplemented from clang_c_adjust.
|
overridevirtual |
Reimplemented from clang_c_adjust.
|
overridevirtual |
Reimplemented from clang_c_adjust.
|
overridevirtual |
Reimplemented from clang_c_adjust.
|
overridevirtual |
methods for expression (exprt) adjustment and other IRs derived from exprt
Reimplemented from clang_c_adjust.
| void clang_cpp_adjust::adjust_new | ( | exprt & | expr | ) |
|
overridevirtual |
Reimplemented from clang_c_adjust.
|
overridevirtual |
Reimplemented from clang_c_adjust.
| void clang_cpp_adjust::adjust_side_effect_assign | ( | side_effect_exprt & | expr | ) |
|
overridevirtual |
Reimplemented from clang_c_adjust.
| void clang_cpp_adjust::adjust_side_effect_throw | ( | side_effect_exprt & | expr | ) |
|
overridevirtual |
Reimplemented from clang_c_adjust.
|
overridevirtual |
methods for symbol adjustment
Reimplemented from clang_c_adjust.
|
overridevirtual |
Reimplemented from clang_c_adjust.
|
overridevirtual |
ancillary methods to support the expr/code adjustments above
Reimplemented from clang_c_adjust.
| void clang_cpp_adjust::convert_exception_id | ( | const typet & | type, |
| const std::string & | suffix, | ||
| std::vector< irep_idt > & | ids, | ||
| bool | is_catch = false ) |
| void clang_cpp_adjust::convert_expression_to_code | ( | exprt & | expr | ) |
ancillary methods to support the expr/code adjustments above
| void clang_cpp_adjust::convert_lvalue_ref_to_deref_sideeffect | ( | exprt & | expr | ) |
| void clang_cpp_adjust::convert_ref_to_deref_symbol | ( | exprt & | expr | ) |
| void clang_cpp_adjust::convert_reference | ( | exprt & | expr | ) |
| void clang_cpp_adjust::gen_implicit_union_copy_move_constructor | ( | symbolt & | symbol | ) |
Generates an implicit copy and move constructor for a symbol if it is a union.
Clang does not generate copy and move constructors for unions, so we need to generate one ourselves.
| symbol | The symbol for which the implicit copy and move constructor is generated. |
| exprt clang_cpp_adjust::gen_vptr_init_rhs | ( | const struct_union_typet::componentt & | comp, |
| const code_typet & | ctor_type ) |
methods for implicit GOTO code generation