cprover
|
#include <cpp_declarator_converter.h>
Public Member Functions | |
cpp_declarator_convertert (class cpp_typecheckt &_cpp_typecheck) | |
symbolt & | convert (const typet &type, const cpp_storage_spect &storage_spec, const cpp_member_spect &member_spec, cpp_declaratort &declarator) |
symbolt & | convert (const cpp_declarationt &declaration, cpp_declaratort &declarator) |
Public Attributes | |
bool | is_typedef |
bool | is_template |
bool | is_template_parameter |
bool | is_friend |
irep_idt | linkage_spec |
class cpp_typecheckt & | cpp_typecheck |
Protected Member Functions | |
void | get_final_identifier () |
irep_idt | get_pretty_name () |
symbolt & | convert_new_symbol (const cpp_storage_spect &storage_spec, const cpp_member_spect &member_spec, cpp_declaratort &declarator) |
void | handle_initializer (symbolt &symbol, cpp_declaratort &declarator) |
void | operator_overloading_rules (const symbolt &symbol) |
void | main_function_rules (const symbolt &symbol) |
void | enforce_rules (const symbolt &symbol) |
void | check_array_types (typet &type, bool force_constant) |
bool | is_code_type (const typet &type) const |
void | combine_types (const source_locationt &source_location, const typet &decl_type, symbolt &symbol) |
Protected Attributes | |
irep_idt | base_name |
typet | final_type |
cpp_scopet * | scope |
irep_idt | final_identifier |
bool | is_code |
Definition at line 25 of file cpp_declarator_converter.h.
cpp_declarator_convertert::cpp_declarator_convertert | ( | class cpp_typecheckt & | _cpp_typecheck | ) |
Definition at line 22 of file cpp_declarator_converter.cpp.
|
protected |
|
protected |
Definition at line 231 of file cpp_declarator_converter.cpp.
References exprt::add_source_location(), cpp_typecheck, symbolt::display_name(), messaget::eom(), messaget::error(), final_type, irept::find(), code_typet::parametert::get_base_name(), irept::get_bool(), code_typet::parametert::get_identifier(), code_typet::get_inlined(), irept::id(), irept::is_nil(), code_typet::parameters(), code_typet::return_type(), code_typet::parametert::set_base_name(), code_typet::parametert::set_identifier(), code_typet::set_inlined(), exprt::source_location(), messaget::mstreamt::source_location, typet::subtype(), to_code_type(), cpp_typecheckt::to_string(), symbolt::type, exprt::type(), and symbolt::value.
Referenced by convert().
symbolt & cpp_declarator_convertert::convert | ( | const typet & | type, |
const cpp_storage_spect & | storage_spec, | ||
const cpp_member_spect & | member_spec, | ||
cpp_declaratort & | declarator | ||
) |
Definition at line 34 of file cpp_declarator_converter.cpp.
References cpp_typecheckt::add_this_to_method_type(), base_name, cpp_typecheckt::check_fixed_size_array(), cpp_typecheckt::check_member_initializers(), cpp_idt::CLASS, combine_types(), struct_union_typet::components(), convert_new_symbol(), cpp_typecheckt::cpp_scopes, cpp_type2name(), cpp_typecheck, cpp_scopest::current_scope(), enforce_rules(), messaget::eom(), messaget::error(), final_identifier, final_type, irept::find(), cpp_typecheckt::full_member_initialization(), irept::get(), irept::get_bool(), get_final_identifier(), irept::get_sub(), symbol_tablet::get_writeable(), handle_initializer(), cpp_typecheckt::has_auto(), irept::id(), cpp_idt::id_class, id_set, cpp_idt::identifier, is_code, is_code_type(), cpp_storage_spect::is_extern(), symbolt::is_extern, is_friend, cpp_scopet::is_global_scope(), irept::is_nil(), irept::is_not_nil(), namespacet::lookup(), cpp_scopet::lookup_identifier(), cpp_declaratort::member_initializers(), cpp_declaratort::merge_type(), cpp_declaratort::method_qualifier(), cpp_declaratort::name(), symbolt::name, cpp_scopest::put_into_scope(), cpp_typecheckt::resolve(), cpp_typecheck_resolvet::resolve_scope(), code_typet::return_type(), scope, irept::set(), cpp_namet::source_location(), messaget::mstreamt::source_location, typet::subtype(), irept::swap(), c_typecheck_baset::symbol_table, cpp_idt::TEMPLATE_PARAMETER, to_code_type(), to_struct_type(), cpp_typecheck_resolvet::TYPE, symbolt::type, exprt::type(), cpp_typecheckt::typecheck_type(), UNREACHABLE, and cpp_declaratort::value().
Referenced by convert(), cpp_typecheckt::convert_anonymous_union(), cpp_typecheckt::convert_non_template_declaration(), cpp_typecheckt::typecheck_decl(), cpp_typecheckt::typecheck_friend_declaration(), and cpp_typecheckt::typecheck_template_parameters().
|
inline |
Definition at line 43 of file cpp_declarator_converter.h.
References convert(), cpp_declarationt::member_spec(), cpp_declarationt::storage_spec(), and exprt::type().
|
protected |
Definition at line 420 of file cpp_declarator_converter.cpp.
References cpp_typecheckt::add_method_body(), symbolt::base_name, base_name, cpp_typecheckt::convert_initializer(), cpp_typecheckt::cpp_scopes, cpp_typecheck, cpp_scopest::current_scope(), cpp_typecheckt::dynamic_initializations, enforce_rules(), messaget::eom(), messaget::error(), final_identifier, final_type, irept::get_bool(), get_pretty_name(), irept::id(), cpp_idt::id_class, id_set, is_code, cpp_storage_spect::is_extern(), symbolt::is_extern, symbolt::is_file_local, is_friend, cpp_scopet::is_global_scope(), cpp_member_spect::is_inline(), symbolt::is_lvalue, symbolt::is_macro, irept::is_not_nil(), is_number(), is_reference(), symbolt::is_state_var, cpp_storage_spect::is_static(), symbolt::is_static_lifetime, is_template, is_template_parameter, symbolt::is_type, is_typedef, linkage_spec, cpp_storage_spect::location(), symbolt::location, cpp_scopet::lookup(), symbolt::mode, symbolt::module, c_typecheck_baset::module, symbol_tablet::move(), cpp_declaratort::name(), symbolt::name, symbolt::pretty_name, cpp_scopest::put_into_scope(), scope, cpp_scopet::SCOPE_ONLY, irept::set(), cpp_namet::source_location(), messaget::mstreamt::source_location, cpp_idt::SYMBOL, c_typecheck_baset::symbol_table, cpp_idt::TEMPLATE, cpp_idt::TEMPLATE_PARAMETER, symbolt::type, exprt::type(), cpp_idt::TYPEDEF, symbolt::value, and cpp_declaratort::value().
Referenced by convert().
|
protected |
Definition at line 313 of file cpp_declarator_converter.cpp.
References main_function_rules(), and operator_overloading_rules().
Referenced by convert(), and convert_new_symbol().
|
protected |
Definition at line 374 of file cpp_declarator_converter.cpp.
References base_name, cpp_typecheck, final_identifier, final_type, cpp_typecheckt::function_identifier(), id2string(), is_code, linkage_spec, cpp_idt::prefix, scope, c_typecheck_baset::symbol_table, and symbol_table_baset::symbols.
Referenced by convert().
|
protected |
Definition at line 560 of file cpp_declarator_converter.cpp.
References base_name, cpp_typecheck, final_type, irept::find(), forall_irep, irept::get_sub(), id2string(), is_code, cpp_idt::prefix, scope, and cpp_typecheckt::to_string().
Referenced by convert_new_symbol().
|
protected |
Definition at line 322 of file cpp_declarator_converter.cpp.
References cpp_typecheckt::add_method_body(), cpp_typecheckt::convert_initializer(), cpp_typecheck, symbolt::display_name(), messaget::error(), irept::id(), is_code, symbolt::is_extern, irept::is_nil(), cpp_declaratort::member_initializers(), cpp_typecheckt::move_member_initializers(), cpp_declaratort::name(), messaget::mstreamt::source_location, irept::swap(), symbolt::type, exprt::type(), symbolt::value, and cpp_declaratort::value().
Referenced by convert().
|
inlineprotected |
Definition at line 84 of file cpp_declarator_converter.h.
References irept::id(), and typet::subtype().
Referenced by convert().
|
protected |
Definition at line 592 of file cpp_declarator_converter.cpp.
References cpp_typecheck, messaget::eom(), messaget::error(), irept::id(), symbolt::location, symbolt::name, code_typet::return_type(), signed_int_type(), messaget::mstreamt::source_location, to_code_type(), and symbolt::type.
Referenced by enforce_rules().
|
protected |
Definition at line 587 of file cpp_declarator_converter.cpp.
Referenced by enforce_rules().
|
protected |
Definition at line 57 of file cpp_declarator_converter.h.
Referenced by convert(), convert_new_symbol(), get_final_identifier(), and get_pretty_name().
class cpp_typecheckt& cpp_declarator_convertert::cpp_typecheck |
Definition at line 54 of file cpp_declarator_converter.h.
Referenced by combine_types(), convert(), convert_new_symbol(), get_final_identifier(), get_pretty_name(), handle_initializer(), and main_function_rules().
|
protected |
Definition at line 60 of file cpp_declarator_converter.h.
Referenced by convert(), convert_new_symbol(), and get_final_identifier().
|
protected |
Definition at line 58 of file cpp_declarator_converter.h.
Referenced by combine_types(), convert(), convert_new_symbol(), get_final_identifier(), and get_pretty_name().
|
protected |
Definition at line 61 of file cpp_declarator_converter.h.
Referenced by convert(), convert_new_symbol(), get_final_identifier(), get_pretty_name(), and handle_initializer().
bool cpp_declarator_convertert::is_friend |
Definition at line 34 of file cpp_declarator_converter.h.
Referenced by convert(), convert_new_symbol(), and cpp_typecheckt::typecheck_friend_declaration().
bool cpp_declarator_convertert::is_template |
Definition at line 32 of file cpp_declarator_converter.h.
Referenced by convert_new_symbol().
bool cpp_declarator_convertert::is_template_parameter |
Definition at line 33 of file cpp_declarator_converter.h.
Referenced by convert_new_symbol(), and cpp_typecheckt::typecheck_template_parameters().
bool cpp_declarator_convertert::is_typedef |
Definition at line 31 of file cpp_declarator_converter.h.
Referenced by convert_new_symbol(), cpp_typecheckt::convert_non_template_declaration(), cpp_typecheckt::typecheck_decl(), and cpp_typecheckt::typecheck_template_parameters().
irep_idt cpp_declarator_convertert::linkage_spec |
Definition at line 35 of file cpp_declarator_converter.h.
Referenced by convert_new_symbol(), and get_final_identifier().
|
protected |
Definition at line 59 of file cpp_declarator_converter.h.
Referenced by convert(), convert_new_symbol(), get_final_identifier(), and get_pretty_name().