cprover
cpp_declarator_convertert Class Reference

#include <cpp_declarator_converter.h>

Collaboration diagram for cpp_declarator_convertert:
[legend]

Public Member Functions

 cpp_declarator_convertert (class cpp_typecheckt &_cpp_typecheck)
 
symboltconvert (const typet &type, const cpp_storage_spect &storage_spec, const cpp_member_spect &member_spec, cpp_declaratort &declarator)
 
symboltconvert (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_typechecktcpp_typecheck
 

Protected Member Functions

void get_final_identifier ()
 
irep_idt get_pretty_name ()
 
symboltconvert_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_scopetscope
 
irep_idt final_identifier
 
bool is_code
 

Detailed Description

Definition at line 25 of file cpp_declarator_converter.h.

Constructor & Destructor Documentation

◆ cpp_declarator_convertert()

cpp_declarator_convertert::cpp_declarator_convertert ( class cpp_typecheckt _cpp_typecheck)

Definition at line 22 of file cpp_declarator_converter.cpp.

Member Function Documentation

◆ check_array_types()

void cpp_declarator_convertert::check_array_types ( typet type,
bool  force_constant 
)
protected

◆ combine_types()

◆ convert() [1/2]

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 33 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(), handle_initializer(), 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, symbol_tablet::symbols, cpp_idt::TEMPLATE_PARAMETER, to_code_type(), to_struct_type(), cpp_typecheck_resolvet::TYPE, symbolt::type, exprt::type(), and cpp_typecheckt::typecheck_type().

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().

◆ convert() [2/2]

symbolt& cpp_declarator_convertert::convert ( const cpp_declarationt declaration,
cpp_declaratort declarator 
)
inline

◆ convert_new_symbol()

symbolt & cpp_declarator_convertert::convert_new_symbol ( const cpp_storage_spect storage_spec,
const cpp_member_spect member_spec,
cpp_declaratort declarator 
)
protected

◆ enforce_rules()

void cpp_declarator_convertert::enforce_rules ( const symbolt symbol)
protected

◆ get_final_identifier()

void cpp_declarator_convertert::get_final_identifier ( )
protected

◆ get_pretty_name()

irep_idt cpp_declarator_convertert::get_pretty_name ( )
protected

◆ handle_initializer()

◆ is_code_type()

bool cpp_declarator_convertert::is_code_type ( const typet type) const
inlineprotected

Definition at line 84 of file cpp_declarator_converter.h.

References irept::id(), and typet::subtype().

Referenced by convert().

◆ main_function_rules()

void cpp_declarator_convertert::main_function_rules ( const symbolt symbol)
protected

◆ operator_overloading_rules()

void cpp_declarator_convertert::operator_overloading_rules ( const symbolt symbol)
protected

Definition at line 591 of file cpp_declarator_converter.cpp.

Referenced by enforce_rules().

Member Data Documentation

◆ base_name

irep_idt cpp_declarator_convertert::base_name
protected

◆ cpp_typecheck

class cpp_typecheckt& cpp_declarator_convertert::cpp_typecheck

◆ final_identifier

irep_idt cpp_declarator_convertert::final_identifier
protected

Definition at line 60 of file cpp_declarator_converter.h.

Referenced by convert(), convert_new_symbol(), and get_final_identifier().

◆ final_type

typet cpp_declarator_convertert::final_type
protected

◆ is_code

bool cpp_declarator_convertert::is_code
protected

◆ is_friend

bool cpp_declarator_convertert::is_friend

◆ is_template

bool cpp_declarator_convertert::is_template

Definition at line 32 of file cpp_declarator_converter.h.

Referenced by convert_new_symbol().

◆ is_template_parameter

bool cpp_declarator_convertert::is_template_parameter

◆ is_typedef

◆ linkage_spec

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().

◆ scope

cpp_scopet* cpp_declarator_convertert::scope
protected

The documentation for this class was generated from the following files: