34 disable_access_control(
false),
35 support_float16_type(
false)
40 gcc_version.
get(
"gcc");
60 disable_access_control(
false),
61 support_float16_type(
false)
66 gcc_version.
get(
"gcc");
78 if(
item.is_declaration())
80 else if(
item.is_linkage_spec())
82 else if(
item.is_namespace_spec())
84 else if(
item.is_using())
86 else if(
item.is_static_assert())
91 error() <<
"unknown parse-tree element: " <<
item.id() <<
eom;
116 const exprt &this_expr=
140 const std::string &
module,
144 cpp_parse_tree, symbol_table,
module, message_handler);
177 catch(
const std::string &e)
184 cpp_typecheck.error().source_location = e.get_source_location();
277 const symbolt &symbol = it->second;
314 it.get_writeable_symbol().value.make_nil();
356 for(
const auto &
compo_it : components)
380 return ::builtin_factory(
virtual void clear()
Reset the abstract state.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
symbol_table_baset & symbol_table
A codet representing sequential composition of program statements.
struct configt::ansi_ct ansi_c
cpp_scopet & current_scope()
void static_and_dynamic_initialization()
Initialization of static objects:
bool contains_cpp_name(const exprt &)
void do_not_typechecked()
dynamic_initializationst dynamic_initializations
void convert_function(symbolt &symbol)
irep_idt current_linkage_spec
bool cpp_is_pod(const typet &type) const
std::optional< codet > cpp_constructor(const source_locationt &source_location, const exprt &object, const exprt::operandst &operands)
void convert(cpp_linkage_spect &)
std::unordered_set< irep_idt > deferred_typechecking
void default_assignop_value(const symbolt &symbol, cpp_declaratort &declarator)
Generate code for the implicit default assignment operator.
bool support_float16_type
cpp_typecheckt(cpp_parse_treet &_cpp_parse_tree, symbol_table_baset &_symbol_table, const std::string &_module, message_handlert &message_handler)
bool builtin_factory(const irep_idt &) override
void typecheck_method_bodies()
void typecheck() override
typechecking main method
std::string to_string(const typet &) override
bool disable_access_control
const struct_typet & this_struct_type()
cpp_parse_treet & cpp_parse_tree
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
std::vector< exprt > operandst
typet & type()
Return the type of the expression.
source_locationt & add_source_location()
bool is_at_least(unsigned v_major, unsigned v_minor=0, unsigned v_patchlevel=0) const
void get(const std::string &executable)
enum gcc_versiont::flavort flavor
Thrown when we can't handle something in an input source file.
bool get_bool(const irep_idt &name) const
const irep_idt & get(const irep_idt &name) const
const irep_idt & id() const
std::size_t get_message_count(unsigned level) const
source_locationt source_location
message_handlert & get_message_handler()
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
const symbol_table_baset & get_symbol_table() const
Return first symbol table registered with the namespace.
Structure type, corresponds to C style structs.
Base type for structs and unions.
std::vector< componentt > componentst
The symbol table base class interface.
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
virtual std::pair< symbolt &, bool > insert(symbolt symbol)=0
Move or copy a new symbol to the symbol table.
virtual void erase(const symbolst::const_iterator &entry)=0
Remove a symbol from the symbol table.
virtual iteratort begin()=0
virtual iteratort end()=0
source_locationt location
Source code location of definition of symbol.
typet type
Type of symbol.
irep_idt name
The unique identifier.
irep_idt irep_idt base_name
Name of module the symbol belongs to.
exprt value
Initial value of symbol.
The type of an expression, extends irept.
cpp_declarationt & to_cpp_declaration(irept &irep)
C++ Language Type Checking.
bool cpp_typecheck(cpp_parse_treet &cpp_parse_tree, symbol_table_baset &symbol_table, const std::string &module, message_handlert &message_handler)
C++ Language Type Checking.
symbol_exprt cpp_symbol_expr(const symbolt &symbol)
std::string type2cpp(const typet &type, const namespacet &ns)
std::string expr2cpp(const exprt &expr, const namespacet &ns)
const std::string & id2string(const irep_idt &d)
static std::unordered_set< irep_idt > init_symbol(const symbolt &sym, code_blockt &code_block, symbol_table_baset &symbol_table, const source_locationt &source_location, bool assume_init_pointers_not_null, const java_object_factory_parameterst &object_factory_parameters, const select_pointer_typet &pointer_type_selector, bool string_refinement_enabled, message_handlert &message_handler)
API to expression classes for Pointers.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
#define CHECK_RETURN(CONDITION)
#define UNREACHABLE
This should be used to mark dead code.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
const codet & to_code(const exprt &expr)
const unary_exprt & to_unary_expr(const exprt &expr)
Cast an exprt to a unary_exprt.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.