34 original_scope(nullptr)
44 for(cpp_scopest::id_sett::const_iterator
57 identifiers.push_back(e);
68 old_identifiers.swap(identifiers);
70 for(resolve_identifierst::const_iterator
71 it=old_identifiers.begin();
72 it!=old_identifiers.end();
83 identifiers.push_back(e);
94 old_identifiers.swap(identifiers);
96 for(resolve_identifierst::const_iterator
97 it=old_identifiers.begin();
98 it!=old_identifiers.end();
105 assert(e.
id()!=ID_type);
106 identifiers.push_back(e);
113 if(identifiers.size()==1)
116 exprt e=*identifiers.begin();
117 assert(e.
id()==ID_template_function_instance);
119 const symbolt &template_symbol=
135 identifiers.push_back(
144 old_identifiers.swap(identifiers);
146 for(resolve_identifierst::const_iterator
147 it=old_identifiers.begin();
148 it!=old_identifiers.end();
152 identifiers.push_back(*it);
160 old_identifiers.swap(identifiers);
162 std::set<irep_idt> ids;
163 std::set<exprt> other;
165 for(resolve_identifierst::const_iterator
166 it=old_identifiers.begin();
167 it!=old_identifiers.end();
172 if(it->id()==ID_symbol)
174 else if(it->id()==ID_type && it->type().id()==ID_symbol)
179 if(other.insert(*it).second)
180 identifiers.push_back(*it);
184 if(ids.insert(
id).second)
185 identifiers.push_back(*it);
201 <<
"without instance:\n" 227 const symbolt &compound_symbol=
230 assert(compound_symbol.
type.
id()==ID_struct ||
231 compound_symbol.
type.
id()==ID_union);
236 const exprt component=
237 struct_union_type.get_component(identifier.
identifier);
261 this_class_identifier <<
'\n';
264 const exprt &this_expr=
276 assert(this_expr.
type().
id()==ID_pointer);
279 object.type().set(ID_C_constant,
281 object.set(ID_C_lvalue,
true);
288 if(object_type.
id()==ID_struct ||
289 object_type.
id()==ID_union)
300 if(
object.is_not_nil())
339 else if(symbol.
type.
id()==ID_c_enum)
356 bool constant=followed_type.
get_bool(ID_C_constant);
358 while(followed_type.
id()==ID_symbol)
362 constant |= followed_type.
get_bool(ID_C_constant);
368 symbol.
value.
id() == ID_constant)
389 old_identifiers.swap(identifiers);
391 for(resolve_identifierst::const_iterator
392 it=old_identifiers.begin();
393 it!=old_identifiers.end();
401 match=(it->id()==ID_type);
405 match=(it->id()!=ID_type);
417 identifiers.push_back(*it);
429 old_identifiers.swap(identifiers);
434 for(resolve_identifierst::const_iterator
435 it=old_identifiers.begin();
436 it!=old_identifiers.end();
442 identifiers.push_back(*it);
451 old_identifiers.swap(identifiers);
454 std::multimap<std::size_t, exprt> distance_map;
456 for(resolve_identifierst::const_iterator
457 it=old_identifiers.begin();
458 it!=old_identifiers.end();
461 unsigned args_distance;
465 std::size_t template_distance=0;
467 if(it->type().get(ID_C_template)!=
"")
468 template_distance=it->type().
469 find(ID_C_template_arguments).find(ID_arguments).get_sub().size();
473 std::size_t total_distance=
475 1000*template_distance+args_distance;
478 std::pair<std::size_t, exprt>(total_distance, *it));
485 if(!distance_map.empty())
487 std::size_t distance=distance_map.begin()->first;
489 for(std::multimap<std::size_t, exprt>::const_iterator
490 it=distance_map.begin();
491 it!=distance_map.end() && it->first==distance;
493 identifiers.push_back(it->second);
496 if(identifiers.size()>1 && fargs.
in_use)
500 for(resolve_identifierst::iterator
501 it1=identifiers.begin();
502 it1!=identifiers.end();
505 if(it1->type().id()!=ID_code)
511 for(resolve_identifierst::iterator it2=
513 it2!=identifiers.end();
522 if(it2->type().id()!=ID_code)
538 i<f1.
parameters().size() && (f1_better || f2_better);
550 if(type1.
id()==ID_pointer)
556 if(type2.
id()==ID_pointer)
565 if(followed1.
id() != ID_struct || followed2.
id() != ID_struct)
581 resolve_identifierst::iterator prev_it=it2;
584 if(f1_better && !f2_better)
585 identifiers.erase(prev_it);
596 for(resolve_identifierst::iterator
597 it=identifiers.begin();
598 it!=identifiers.end();
601 if(it->id()!=ID_type)
604 new_identifiers.push_back(*it);
608 const typet &symbol_type=
620 exprt pod_constructor1(
"pod_constructor", t1);
621 new_identifiers.push_back(pod_constructor1);
627 exprt pod_constructor2(
"pod_constructor", t2);
628 new_identifiers.push_back(pod_constructor2);
632 if(symbol_type.
id()==ID_c_enum_tag)
635 exprt pod_constructor3(
"pod_constructor", t3);
636 new_identifiers.push_back(pod_constructor3);
639 else if(symbol_type.
id()==ID_struct)
647 for(struct_typet::componentst::const_iterator
648 itc=components.begin();
649 itc!=components.end();
655 if(component.
get_bool(ID_from_base))
658 if(type.
find(ID_return_type).
id()==ID_constructor)
664 new_identifiers.push_back(e);
670 identifiers.
swap(new_identifiers);
682 if(base_name==ID_unsignedbv ||
683 base_name==ID_signedbv)
685 if(arguments.size()!=1)
689 << base_name <<
" expects one template argument, but got " 694 const exprt &argument=arguments.front();
696 if(argument.
id()==ID_type)
700 << base_name <<
" expects one integer template argument, " 718 <<
"template argument must be greater than zero" 726 else if(base_name==ID_fixedbv)
728 if(arguments.size()!=2)
732 << base_name <<
" expects two template arguments, but got " 737 const exprt &argument0=arguments[0];
738 const exprt &argument1=arguments[1];
740 if(argument0.
id()==ID_type)
744 << base_name <<
" expects two integer template arguments, " 749 if(argument1.
id()==ID_type)
753 << base_name <<
" expects two integer template arguments, " 780 <<
"template argument must be greater than zero" 789 <<
"template argument must be greater or equal zero" 794 if(integer_bits>width)
798 <<
"template argument must be smaller or equal width" 807 else if(base_name==ID_integer)
809 if(!arguments.empty())
813 << base_name <<
" expects no template arguments" 825 else if(base_name==
"dump_scopes")
833 else if(base_name==
"current_scope")
840 else if(base_name == ID_size_t)
844 else if(base_name == ID_ssize_t)
867 assert(cpp_name.
id()==ID_cpp_name);
868 assert(!cpp_name.
get_sub().empty());
873 irept::subt::const_iterator
pos=cpp_name.
get_sub().begin();
885 std::string final_base_name=
"";
890 if(
pos->id()==ID_name)
891 final_base_name+=
pos->get_string(ID_identifier);
892 else if(
pos->id()==ID_template_args)
894 else if(
pos->id()==
"::")
947 << final_base_name <<
"' is ambiguous" 966 final_base_name.clear();
968 else if(
pos->id()==ID_operator)
970 final_base_name+=
"operator";
972 irept::subt::const_iterator next=
pos+1;
973 assert(next != cpp_name.
get_sub().end());
975 if(next->id() == ID_cpp_name ||
976 next->id() == ID_pointer ||
977 next->id() == ID_int ||
978 next->id() == ID_char ||
979 next->id() == ID_bool ||
980 next->id() == ID_merged_type)
985 op_name.
swap(next_ir);
992 final_base_name+=
pos->id_string();
997 base_name=final_base_name;
1017 std::set<irep_idt> primary_templates;
1019 for(cpp_scopest::id_sett::const_iterator
1024 const irep_idt id=(*it)->identifier;
1032 if(specialization_of!=
"")
1033 primary_templates.insert(specialization_of);
1035 primary_templates.insert(
id);
1038 assert(!primary_templates.empty());
1040 if(primary_templates.size()>=2)
1049 const symbolt &primary_template_symbol=
1062 full_template_args_tc=
1065 primary_template_symbol,
1066 full_template_args);
1072 std::vector<matcht> matches;
1076 matcht(full_template_args_tc, full_template_args_tc,
1077 primary_template_symbol.
name));
1079 for(cpp_scopest::id_sett::const_iterator
1084 const irep_idt id=(*it)->identifier;
1088 if(specialization_of==
"")
1106 assert(full_template_args_tc.
arguments().size()==
1107 partial_specialization_args.
arguments().size());
1115 if(template_scope==
nullptr)
1119 <<
"class template instantiation error" 1127 for(std::size_t i=0; i<full_template_args_tc.
arguments().size(); i++)
1129 if(full_template_args_tc.
arguments()[i].id()==ID_type)
1131 full_template_args_tc.
arguments()[i].type());
1150 primary_template_symbol,
1151 partial_specialization_args);
1155 assert(partial_specialization_args_tc.
arguments().size()==
1156 full_template_args_tc.
arguments().size());
1158 if(partial_specialization_args_tc==
1159 full_template_args_tc)
1161 matches.push_back(
matcht(
1162 guessed_template_args, full_template_args_tc,
id));
1167 assert(!matches.empty());
1169 std::sort(matches.begin(), matches.end());
1172 for(std::vector<matcht>::const_iterator
1173 m_it=matches.begin();
1174 m_it!=matches.end();
1177 std::cout <<
"M: " << m_it->cost
1178 <<
" " << m_it->id <<
'\n';
1184 const matcht &match=*matches.begin();
1198 if(instance.
type.
id()!=ID_struct &&
1199 instance.
type.
id()!=ID_incomplete_struct)
1203 << base_name <<
"' is not a class";
1258 else if(
id_set.size()==1)
1278 for(resolve_identifierst::const_iterator
1279 it=identifiers.begin();
1280 it!=identifiers.end();
1283 const exprt &id_expr=*it;
1287 if(id_expr.
id()==ID_type)
1298 if(id_expr.
id()==ID_member)
1303 else if(id_expr.
id()==
"pod_constructor")
1305 out <<
"constructor ";
1308 else if(id_expr.
id()==ID_template_function_instance)
1321 else if(id_expr.
type().
id()==ID_code)
1327 out <<
" " <<
id <<
"(";
1329 for(code_typet::parameterst::const_iterator
1330 it=parameters.begin(); it!=parameters.end(); it++)
1332 const typet ¶meter_type=it->type();
1334 if(it!=parameters.begin())
1342 if(!parameters.empty())
1352 if(id_expr.
id()==ID_symbol)
1355 out <<
" (" << symbol.
location <<
")";
1357 else if(id_expr.
id()==ID_template_function_instance)
1361 out <<
" (" << symbol.
location <<
")";
1373 bool fail_with_exception)
1396 if(base_name==
"__func__" ||
1397 base_name==
"__FUNCTION__" ||
1398 base_name==
"__PRETTY_FUNCTION__")
1414 if(template_args.
is_nil())
1417 base_name, lookup_kind,
id_set);
1426 id_set.insert(&builtin_id);
1442 if(!fail_with_exception)
1452 << base_name <<
"' not found";
1465 << base_name <<
"' is unknown";
1480 bool have_classes=
false, have_methods=
false;
1482 for(cpp_scopest::id_sett::const_iterator
1487 const irep_idt id=(*it)->identifier;
1496 if(want==
wantt::BOTH && have_classes && have_methods)
1498 if(!fail_with_exception)
1504 <<
"template symbol `" 1513 identifiers.push_back(
exprt(ID_type, instance));
1519 id_set, want, fargs, identifiers);
1522 identifiers, template_args, fargs);
1528 id_set, want, fargs, identifiers);
1535 filter(identifiers, want);
1538 std::cout <<
"P0 " << base_name <<
" " << identifiers.
size() <<
"\n";
1551 std::cout <<
"P1 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1560 std::cout <<
"P2 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1566 if(new_identifiers.empty())
1568 new_identifiers=identifiers;
1570 if(template_args.
is_nil())
1574 if(new_identifiers.empty())
1575 new_identifiers=identifiers;
1581 std::cout <<
"P3 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1590 std::cout <<
"P4 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1595 if(new_identifiers.size()==1)
1597 result=*new_identifiers.begin();
1602 if(!fail_with_exception)
1605 if(new_identifiers.empty())
1609 <<
"found no match for symbol `" << base_name
1610 <<
"', candidates are:\n";
1617 <<
"symbol `" << base_name
1618 <<
"' does not uniquely resolve:\n";
1622 exprt e1=*new_identifiers.begin();
1623 exprt e2=*(++new_identifiers.begin());
1630 << (e1.get(ID_identifier)==e2.
get(ID_identifier))
1632 cpp_typecheck.str <<
"e1.iden:: " << e1.get(ID_identifier) <<
'\n';
1641 for(exprt::operandst::const_iterator
1662 if(result.
get_bool(
"#not_accessible"))
1665 if(!fail_with_exception)
1670 <<
"error: member `" << result.
get(
"component_name").
c_str()
1671 <<
"' is not accessible";
1681 if(!fail_with_exception)
1687 <<
"error: expected expression, but got type `" 1696 if(result.
id()!=ID_type)
1698 if(!fail_with_exception)
1704 <<
"error: expected type, but got expression `" 1720 const exprt &template_expr,
1721 const exprt &desired_expr)
1723 if(template_expr.
id()==ID_cpp_name)
1741 for(cpp_scopest::id_sett::const_iterator it=
id_set.begin();
1751 if(e.
id()==ID_unassigned)
1755 if(e.
type()!=old_type)
1765 const typet &template_type,
1766 const typet &desired_type)
1799 std::cout <<
"TT: " << template_type.
pretty() <<
'\n';
1800 std::cout <<
"DT: " << desired_type.
pretty() <<
'\n';
1803 if(template_type.
id()==ID_cpp_name)
1831 for(cpp_scopest::id_sett::const_iterator
1843 if(t.
id()==ID_unassigned)
1851 std::cout <<
"ASSIGN " <<
id.identifier <<
" := " 1860 else if(template_type.
id()==ID_merged_type)
1863 for(typet::subtypest::const_iterator
1864 it=template_type.
subtypes().begin();
1865 it!=template_type.
subtypes().end();
1876 else if(template_type.
id()==ID_pointer)
1878 const typet &desired_type_followed=
1881 if(desired_type_followed.
id()==ID_pointer)
1885 else if(template_type.
id()==ID_array)
1887 const typet &desired_type_followed=
1890 if(desired_type_followed.
id()==ID_array)
1895 desired_type_followed.
subtype());
1915 assert(expr.
id()==ID_symbol);
1923 if(cpp_declaration.is_class_template())
1935 const symbolt &template_symbol=
1943 cpp_declaration.template_type());
1946 assert(cpp_declaration.declarators().size()==1);
1949 cpp_declaration.declarators().front();
1952 if(function_declarator.type().id()!=ID_function_type)
1956 <<
"expected function type for function template" 1968 if(template_scope==
nullptr)
1972 << template_identifier <<
'\n' 1973 <<
"function template instantiation error" 1983 function_declarator.type().find(ID_parameters).get_sub();
1985 exprt::operandst::const_iterator it=fargs.
operands.begin();
1986 for(
const auto ¶meter : parameters)
1991 if(parameter.id()==ID_cpp_declaration)
2002 merge_type(arg_declaration.
type());
2019 cpp_declaration.template_type());
2026 typet function_type=
2027 function_declarator.merge_type(cpp_declaration.type());
2033 function_type.
set(ID_C_template, template_symbol.
name);
2034 function_type.
set(ID_C_template_arguments, template_args);
2038 exprt template_function_instance(
2039 ID_template_function_instance, function_type);
2041 return template_function_instance;
2049 if(expr.
id()!=ID_symbol)
2052 const symbolt &template_symbol =
2059 if(template_args_non_tc.
is_nil())
2080 template_args_non_tc);
2119 code_type.
parameters()[0].get(ID_C_base_name)==ID_this)
2126 fargs.
operands.begin()->type().get(ID_identifier));
2128 assert(type_symb.
type.
id()==ID_struct);
2134 "method should exist in struct");
2153 unsigned &args_distance,
2163 if(expr.
id()==ID_member ||
2173 assert(parameter.
get(ID_C_base_name)==ID_this);
2180 object.set(ID_C_lvalue,
true);
2189 fargs.
operands.size() == parameters.size())
2221 for(cpp_scopest::id_sett::const_iterator
2228 if(
id.is_class() ||
id.is_enum() ||
id.is_namespace())
2231 assert(
id.is_scope);
2232 new_set.insert(&
id);
2234 else if(
id.is_typedef())
2246 assert(pcomp.
get_bool(ID_is_type));
2248 assert(type.id()!=ID_struct);
2249 if(type.id()==ID_symbol)
2261 if(symbol.
type.
id()==ID_struct)
2268 new_set.insert(&class_id);
2271 else if(symbol.
type.
id()==ID_symbol)
2285 if(symbol.
type.
get(ID_type)==ID_struct)
2287 id.print(std::cout);
2288 assert(
id.is_scope);
2289 new_set.insert(&
id);
2308 std::cout <<
"E: " << e.
pretty() <<
'\n';
2314 if(e.
type().
id()==ID_symbol)
2325 if(symbol.
type.
id()==ID_symbol)
2327 else if(symbol.
type.
id()==ID_struct ||
2328 symbol.
type.
id()==ID_incomplete_struct ||
2329 symbol.
type.
id()==ID_union ||
2330 symbol.
type.
id()==ID_incomplete_union ||
2331 symbol.
type.
id()==ID_c_enum)
2338 new_set.insert(&class_id);
2355 for(cpp_scopest::id_sett::iterator
2360 if((*it)->is_namespace())
2364 cpp_scopest::id_sett::iterator old(it);
2377 for(
const auto &arg : fargs.
operands)
2381 if(final_type.
id()!=ID_struct && final_type.
id()!=ID_union)
2388 id_set.insert(tmp_set.begin(), tmp_set.end());
const irep_idt & get_name() const
exprt convert_template_parameter(const cpp_idt &id)
The type of an expression.
irep_idt name
The unique identifier.
C++ Language Type Checking.
source_locationt source_location
void typecheck_type(typet &type)
const std::string & id2string(const irep_idt &d)
bool match(const code_typet &code_type, unsigned &distance, cpp_typecheckt &cpp_typecheck) const
pointer_typet pointer_type(const typet &subtype)
std::set< cpp_idt * > id_sett
void typecheck_expr_member(exprt &expr)
void lookup(const irep_idt &base_name, lookup_kindt kind, id_sett &id_set)
const std::string integer2string(const mp_integer &n, unsigned base)
void print(std::ostream &out, unsigned indent=0) const
bool has_unassigned() const
void set_value(const irep_idt &value)
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
std::vector< irept > subt
exprt resolve(const cpp_namet &cpp_name, const wantt want, const cpp_typecheck_fargst &fargs, bool fail_with_exception=true)
instantiation_stackt instantiation_stack
exprt::operandst argumentst
irep_idt get_specialization_of() const
void guess_template_args(const typet &template_parameter, const typet &desired_type)
bool has_ellipsis() const
const symbolt & instantiate_template(const source_locationt &source_location, const symbolt &symbol, const cpp_template_args_tct &specialization_template_args, const cpp_template_args_tct &full_template_args, const typet &specialization=typet(ID_nil))
void remove_duplicates(resolve_identifierst &identifiers)
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
void disambiguate_functions(resolve_identifierst &identifiers, const cpp_typecheck_fargst &fargs)
const irep_idt & get_function() const
cpp_template_args_tct typecheck_template_args(const source_locationt &source_location, const symbolt &template_symbol, const cpp_template_args_non_tct &template_args)
exprt::operandst operands
void copy_to_operands(const exprt &expr)
void remove_templates(resolve_identifierst &identifiers)
const irep_idt & get_identifier() const
cpp_namet & to_cpp_name(irept &cpp_name)
std::vector< componentt > componentst
void move_to_operands(exprt &expr)
cpp_scopet & get_parent() const
const symbol_typet & to_symbol_type(const typet &type)
Cast a generic typet to a symbol_typet.
std::vector< parametert > parameterst
An expression denoting a type.
cpp_template_args_non_tct & partial_specialization_args()
exprt convert_identifier(const cpp_idt &id, const wantt want, const cpp_typecheck_fargst &fargs)
void show_instantiation_stack(std::ostream &)
exprt value
Initial value of symbol.
const componentst & components() const
template_mapt template_map
bool has_component_rec(const typet &type, const irep_idt &component_name, const namespacet &ns)
cpp_template_args_tct & to_cpp_template_args_tc(irept &irep)
bool cpp_typecheck(cpp_parse_treet &cpp_parse_tree, symbol_tablet &symbol_table, const std::string &module, message_handlert &message_handler)
unsignedbv_typet size_type()
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
static mstreamt & eom(mstreamt &m)
bool get_bool(const irep_namet &name) const
cpp_template_args_non_tct & to_cpp_template_args_non_tc(irept &irep)
bool is_qualified() const
signedbv_typet signed_size_type()
exprt lookup(const irep_idt &identifier) const
cpp_scopet & get_root_scope()
Extract member of struct or union.
mstreamt & warning() const
cpp_template_args_tct full_args
bool is_class_template() const
const irep_idt & id() const
const source_locationt & source_location() const
void elaborate_class_template(const typet &type)
elaborate class template instances
const declaratorst & declarators() const
void exact_match_functions(resolve_identifierst &identifiers, const cpp_typecheck_fargst &fargs)
A reference into the symbol table.
void filter_for_namespaces(cpp_scopest::id_sett &id_set)
cpp_scopet * original_scope
const source_locationt & find_source_location() const
bool has_template_args() const
source_locationt source_location
bool cpp_is_pod(const typet &type) const
symbol_typet disambiguate_template_classes(const irep_idt &base_name, const cpp_scopest::id_sett &id_set, const cpp_template_args_non_tct &template_args)
disambiguate partial specialization
API to expression classes.
void filter(resolve_identifierst &identifiers, const wantt want)
bool is_reference(const typet &type)
TO_BE_DOCUMENTED.
cpp_idt & get_id(const irep_idt &identifier)
const irep_idt & get(const irep_namet &name) const
bool has_prefix(const std::string &s, const std::string &prefix)
cpp_template_args_tct build_template_args(const template_typet &template_type) const
std::string cpp_type2name(const typet &type)
Base class for tree-like data structures with sharing.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
irep_idt class_identifier
void add_object(const exprt &expr)
C++ Language Type Checking.
const typet & follow(const typet &) const
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
exprt do_builtin(const irep_idt &base_name, const cpp_template_args_non_tct &template_args)
typet type
Type of symbol.
source_locationt location
Source code location of definition of symbol.
cpp_declarationt & to_cpp_declaration(irept &irep)
void guess_function_template_args(resolve_identifierst &identifiers, const cpp_typecheck_fargst &fargs)
guess arguments of function templates
bool subtype_typecast(const struct_typet &from, const struct_typet &to) const
void resolve_with_arguments(cpp_scopest::id_sett &id_set, const irep_idt &base_name, const cpp_typecheck_fargst &fargs)
void convert_identifiers(const cpp_scopest::id_sett &id_set, const wantt want, const cpp_typecheck_fargst &fargs, resolve_identifierst &identifiers)
cpp_template_args_tct specialization_args
Base type of C structs and unions, and C++ classes.
bool is_number(const typet &type)
bool builtin_factory(const irep_idt &)
const array_typet & to_array_type(const typet &type)
Cast a generic typet to an array_typet.
const symbolt & class_template_symbol(const source_locationt &source_location, const symbolt &template_symbol, const cpp_template_args_tct &specialization_template_args, const cpp_template_args_tct &full_template_args)
Base class for all expressions.
bool is_rvalue_reference(const typet &type)
TO_BE_DOCUMENTED.
const parameterst & parameters() const
cpp_scopet & current_scope()
void build_unassigned(const template_typet &template_type)
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
source_locationt & add_source_location()
const source_locationt & source_location() const
virtual std::string to_string(const typet &type)
void cpp_convert_plain_type(typet &type)
bool disable_access_control
void show_identifiers(const irep_idt &base_name, const resolve_identifierst &identifiers, std::ostream &out)
source_locationt & add_source_location()
cpp_typecheck_resolvet(class cpp_typecheckt &_cpp_typecheck)
Expression to hold a symbol (variable)
cpp_scopet & get_scope(const irep_idt &identifier)
const char * c_str() const
std::vector< exprt > resolve_identifierst
signedbv_typet signed_int_type()
exprt cpp_symbol_expr(const symbolt &symbol)
void remove(const irep_namet &name)
void make_constructors(resolve_identifierst &identifiers)
const typet & subtype() const
void filter_for_named_scopes(cpp_scopest::id_sett &id_set)
#define DATA_INVARIANT(CONDITION, REASON)
void apply_template_args(resolve_identifierst &identifiers, const cpp_template_args_non_tct &template_args, const cpp_typecheck_fargst &fargs)
template_typet & template_type()
bool is_root_scope() const
cpp_idt & insert(const irep_idt &_base_name)
void make_typecast(const typet &_type)
const irept & find(const irep_namet &name) const
const typet & return_type() const
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See namespace_baset::lookup().
const irep_idt & get_identifier() const
cpp_scopet & resolve_namespace(const cpp_namet &cpp_name)
void set(const irep_namet &name, const irep_idt &value)
const componentt & get_component(const irep_idt &component_name) const
void print(std::ostream &out) const
cpp_typecheckt & cpp_typecheck
cpp_scopet & resolve_scope(const cpp_namet &cpp_name, irep_idt &base_name, cpp_template_args_non_tct &template_args)
C Language Type Checking.