43 for(cpp_scopest::id_sett::const_iterator
56 identifiers.push_back(e);
67 old_identifiers.swap(identifiers);
69 for(resolve_identifierst::const_iterator
70 it=old_identifiers.begin();
71 it!=old_identifiers.end();
82 identifiers.push_back(e);
93 old_identifiers.swap(identifiers);
95 for(resolve_identifierst::const_iterator
96 it=old_identifiers.begin();
97 it!=old_identifiers.end();
104 assert(e.
id()!=ID_type);
105 identifiers.push_back(e);
112 if(identifiers.size()==1)
115 exprt e=*identifiers.begin();
116 assert(e.
id()==ID_template_function_instance);
118 const symbolt &template_symbol=
134 identifiers.push_back(
143 old_identifiers.swap(identifiers);
145 for(resolve_identifierst::const_iterator
146 it=old_identifiers.begin();
147 it!=old_identifiers.end();
151 identifiers.push_back(*it);
159 old_identifiers.swap(identifiers);
161 std::set<irep_idt> ids;
162 std::set<exprt> other;
164 for(resolve_identifierst::const_iterator
165 it=old_identifiers.begin();
166 it!=old_identifiers.end();
171 if(it->id()==ID_symbol)
172 id=it->get(ID_identifier);
173 else if(it->id()==ID_type && it->type().id()==ID_symbol)
174 id=it->type().get(ID_identifier);
178 if(other.insert(*it).second)
179 identifiers.push_back(*it);
183 if(ids.insert(
id).second)
184 identifiers.push_back(*it);
200 <<
"without instance:\n" 226 const symbolt &compound_symbol=
229 assert(compound_symbol.
type.
id()==ID_struct ||
230 compound_symbol.
type.
id()==ID_union);
235 const exprt component=
236 struct_union_type.get_component(identifier.
identifier);
260 this_class_identifier <<
'\n';
263 const exprt &this_expr=
275 assert(this_expr.
type().
id()==ID_pointer);
278 object.type().set(ID_C_constant,
280 object.set(ID_C_lvalue,
true);
287 if(object_type.
id()==ID_struct ||
288 object_type.
id()==ID_union)
299 if(
object.is_not_nil())
333 else if(symbol.
type.
id()==ID_c_enum)
350 bool constant=followed_type.
get_bool(ID_C_constant);
352 while(followed_type.
id()==ID_symbol)
356 constant |= followed_type.
get_bool(ID_C_constant);
362 symbol.
value.
id() == ID_constant)
383 old_identifiers.swap(identifiers);
385 for(resolve_identifierst::const_iterator
386 it=old_identifiers.begin();
387 it!=old_identifiers.end();
395 match=(it->id()==ID_type);
399 match=(it->id()!=ID_type);
411 identifiers.push_back(*it);
423 old_identifiers.swap(identifiers);
428 for(resolve_identifierst::const_iterator
429 it=old_identifiers.begin();
430 it!=old_identifiers.end();
436 identifiers.push_back(*it);
445 old_identifiers.swap(identifiers);
448 std::multimap<std::size_t, exprt> distance_map;
450 for(resolve_identifierst::const_iterator
451 it=old_identifiers.begin();
452 it!=old_identifiers.end();
455 unsigned args_distance;
459 std::size_t template_distance=0;
461 if(it->type().get(ID_C_template)!=
"")
462 template_distance=it->type().
463 find(ID_C_template_arguments).find(ID_arguments).get_sub().size();
467 std::size_t total_distance=
469 1000*template_distance+args_distance;
472 std::pair<std::size_t, exprt>(total_distance, *it));
479 if(!distance_map.empty())
481 std::size_t distance=distance_map.begin()->first;
483 for(std::multimap<std::size_t, exprt>::const_iterator
484 it=distance_map.begin();
485 it!=distance_map.end() && it->first==distance;
487 identifiers.push_back(it->second);
490 if(identifiers.size()>1 && fargs.
in_use)
494 for(resolve_identifierst::iterator
495 it1=identifiers.begin();
496 it1!=identifiers.end();
499 if(it1->type().id()!=ID_code)
505 for(resolve_identifierst::iterator it2=
507 it2!=identifiers.end();
516 if(it2->type().id()!=ID_code)
532 i<f1.
parameters().size() && (f1_better || f2_better);
544 if(type1.
id()==ID_pointer)
550 if(type2.
id()==ID_pointer)
559 if(followed1.
id() != ID_struct || followed2.
id() != ID_struct)
575 resolve_identifierst::iterator prev_it=it2;
578 if(f1_better && !f2_better)
579 identifiers.erase(prev_it);
590 resolve_identifierst::iterator next;
592 for(resolve_identifierst::iterator
593 it=identifiers.begin();
594 it!=identifiers.end();
597 if(it->id()!=ID_type)
600 new_identifiers.push_back(*it);
604 const typet &symbol_type=
617 exprt pod_constructor1(
"pod_constructor", t1);
618 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)
638 exprt pod_constructor3(
"pod_constructor", t3);
639 new_identifiers.push_back(pod_constructor3);
642 else if(symbol_type.
id()==ID_struct)
650 for(struct_typet::componentst::const_iterator
651 itc=components.begin();
652 itc!=components.end();
658 if(component.
get_bool(ID_from_base))
661 if(type.
find(ID_return_type).
id()==ID_constructor)
667 new_identifiers.push_back(e);
673 identifiers.
swap(new_identifiers);
685 if(base_name==ID_unsignedbv ||
686 base_name==ID_signedbv)
688 if(arguments.size()!=1)
692 << base_name <<
" expects one template argument, but got " 697 const exprt &argument=arguments.front();
699 if(argument.
id()==ID_type)
703 << base_name <<
" expects one integer template argument, " 721 <<
"template argument must be greater than zero" 729 else if(base_name==ID_fixedbv)
731 if(arguments.size()!=2)
735 << base_name <<
" expects two template arguments, but got " 740 const exprt &argument0=arguments[0];
741 const exprt &argument1=arguments[1];
743 if(argument0.
id()==ID_type)
747 << base_name <<
" expects two integer template arguments, " 752 if(argument1.
id()==ID_type)
756 << base_name <<
" expects two integer template arguments, " 783 <<
"template argument must be greater than zero" 792 <<
"template argument must be greater or equal zero" 797 if(integer_bits>width)
801 <<
"template argument must be smaller or equal width" 810 else if(base_name==ID_integer)
812 if(!arguments.empty())
816 << base_name <<
" expects no template arguments" 828 else if(base_name==
"dump_scopes")
836 else if(base_name==
"current_scope")
843 else if(base_name==
"size_t")
847 else if(base_name==
"ssize_t")
870 assert(cpp_name.
id()==ID_cpp_name);
871 assert(!cpp_name.
get_sub().empty());
876 irept::subt::const_iterator
pos=cpp_name.
get_sub().begin();
888 std::string final_base_name=
"";
893 if(
pos->id()==ID_name)
894 final_base_name+=
pos->get_string(ID_identifier);
895 else if(
pos->id()==ID_template_args)
897 else if(
pos->id()==
"::")
950 << final_base_name <<
"' is ambiguous" 969 final_base_name.clear();
971 else if(
pos->id()==ID_operator)
973 final_base_name+=
"operator";
975 irept::subt::const_iterator next=
pos+1;
976 assert(next != cpp_name.
get_sub().end());
978 if(next->id() == ID_cpp_name ||
979 next->id() == ID_pointer ||
980 next->id() == ID_int ||
981 next->id() == ID_char ||
982 next->id() == ID_bool ||
983 next->id() == ID_merged_type)
988 op_name.
swap(next_ir);
995 final_base_name+=
pos->id_string();
1000 base_name=final_base_name;
1020 std::set<irep_idt> primary_templates;
1022 for(cpp_scopest::id_sett::const_iterator
1027 const irep_idt id=(*it)->identifier;
1035 if(specialization_of!=
"")
1036 primary_templates.insert(specialization_of);
1038 primary_templates.insert(
id);
1041 assert(!primary_templates.empty());
1043 if(primary_templates.size()>=2)
1052 assert(primary_templates.size()==1);
1054 const symbolt &primary_template_symbol=
1067 full_template_args_tc=
1070 primary_template_symbol,
1071 full_template_args);
1077 std::vector<matcht> matches;
1081 matcht(full_template_args_tc, full_template_args_tc,
1082 primary_template_symbol.name));
1084 for(cpp_scopest::id_sett::const_iterator
1089 const irep_idt id=(*it)->identifier;
1093 if(specialization_of==
"")
1111 assert(full_template_args_tc.
arguments().size()==
1112 partial_specialization_args.
arguments().size());
1120 if(template_scope==
nullptr)
1124 <<
"class template instantiation error" 1132 for(std::size_t i=0; i<full_template_args_tc.
arguments().size(); i++)
1134 if(full_template_args_tc.
arguments()[i].id()==ID_type)
1136 full_template_args_tc.
arguments()[i].type());
1155 primary_template_symbol,
1156 partial_specialization_args);
1160 assert(partial_specialization_args_tc.
arguments().size()==
1161 full_template_args_tc.
arguments().size());
1163 if(partial_specialization_args_tc==
1164 full_template_args_tc)
1166 matches.push_back(
matcht(
1167 guessed_template_args, full_template_args_tc,
id));
1172 assert(!matches.empty());
1174 std::sort(matches.begin(), matches.end());
1177 for(std::vector<matcht>::const_iterator
1178 m_it=matches.begin();
1179 m_it!=matches.end();
1182 std::cout <<
"M: " << m_it->cost
1183 <<
" " << m_it->id <<
'\n';
1189 const matcht &match=*matches.begin();
1203 if(instance.
type.
id()!=ID_struct &&
1204 instance.
type.
id()!=ID_incomplete_struct)
1208 << base_name <<
"' is not a class";
1263 else if(
id_set.size()==1)
1283 for(resolve_identifierst::const_iterator
1284 it=identifiers.begin();
1285 it!=identifiers.end();
1288 const exprt &id_expr=*it;
1292 if(id_expr.
id()==ID_type)
1303 if(id_expr.
id()==ID_member)
1308 else if(id_expr.
id()==
"pod_constructor")
1310 out <<
"constructor ";
1313 else if(id_expr.
id()==ID_template_function_instance)
1326 else if(id_expr.
type().
id()==ID_code)
1332 out <<
" " <<
id <<
"(";
1334 for(code_typet::parameterst::const_iterator
1335 it=parameters.begin(); it!=parameters.end(); it++)
1337 const typet ¶meter_type=it->type();
1339 if(it!=parameters.begin())
1347 if(!parameters.empty())
1357 if(id_expr.
id()==ID_symbol)
1360 out <<
" (" << symbol.
location <<
")";
1362 else if(id_expr.
id()==ID_template_function_instance)
1366 out <<
" (" << symbol.
location <<
")";
1378 bool fail_with_exception)
1401 if(base_name==
"__func__" ||
1402 base_name==
"__FUNCTION__" ||
1403 base_name==
"__PRETTY_FUNCTION__")
1419 if(template_args.
is_nil())
1421 base_name, lookup_kind,
id_set);
1435 if(!fail_with_exception)
1445 << base_name <<
"' not found";
1458 << base_name <<
"' is unknown";
1473 bool have_classes=
false, have_methods=
false;
1475 for(cpp_scopest::id_sett::const_iterator
1480 const irep_idt id=(*it)->identifier;
1489 if(want==
wantt::BOTH && have_classes && have_methods)
1491 if(!fail_with_exception)
1497 <<
"template symbol `" 1506 identifiers.push_back(
exprt(ID_type, instance));
1512 id_set, want, fargs, identifiers);
1515 identifiers, template_args, fargs);
1521 id_set, want, fargs, identifiers);
1528 filter(identifiers, want);
1531 std::cout <<
"P0 " << base_name <<
" " << identifiers.
size() <<
"\n";
1544 std::cout <<
"P1 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1553 std::cout <<
"P2 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1559 if(new_identifiers.empty())
1561 new_identifiers=identifiers;
1563 if(template_args.
is_nil())
1567 if(new_identifiers.empty())
1568 new_identifiers=identifiers;
1574 std::cout <<
"P3 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1583 std::cout <<
"P4 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1588 if(new_identifiers.size()==1)
1590 result=*new_identifiers.begin();
1595 if(!fail_with_exception)
1598 if(new_identifiers.empty())
1602 <<
"found no match for symbol `" << base_name
1603 <<
"', candidates are:\n";
1610 <<
"symbol `" << base_name
1611 <<
"' does not uniquely resolve:\n";
1615 exprt e1=*new_identifiers.begin();
1616 exprt e2=*(++new_identifiers.begin());
1623 << (e1.get(ID_identifier)==e2.
get(ID_identifier))
1625 cpp_typecheck.str <<
"e1.iden:: " << e1.get(ID_identifier) <<
'\n';
1634 for(exprt::operandst::const_iterator
1655 if(result.
get_bool(
"#not_accessible"))
1658 if(!fail_with_exception)
1663 <<
"error: member `" << result.
get(
"component_name").
c_str()
1664 <<
"' is not accessible";
1674 if(!fail_with_exception)
1680 <<
"error: expected expression, but got type `" 1689 if(result.
id()!=ID_type)
1691 if(!fail_with_exception)
1697 <<
"error: expected type, but got expression `" 1713 const exprt &template_expr,
1714 const exprt &desired_expr)
1716 if(template_expr.
id()==ID_cpp_name)
1734 for(cpp_scopest::id_sett::const_iterator it=
id_set.begin();
1744 if(e.
id()==ID_unassigned)
1748 if(e.
type()!=old_type)
1758 const typet &template_type,
1759 const typet &desired_type)
1792 std::cout <<
"TT: " << template_type.
pretty() <<
'\n';
1793 std::cout <<
"DT: " << desired_type.
pretty() <<
'\n';
1796 if(template_type.
id()==ID_cpp_name)
1824 for(cpp_scopest::id_sett::const_iterator
1836 if(t.
id()==ID_unassigned)
1844 std::cout <<
"ASSIGN " <<
id.identifier <<
" := " 1853 else if(template_type.
id()==ID_merged_type)
1856 for(typet::subtypest::const_iterator
1857 it=template_type.
subtypes().begin();
1858 it!=template_type.
subtypes().end();
1869 else if(template_type.
id()==ID_pointer)
1871 const typet &desired_type_followed=
1874 if(desired_type_followed.
id()==ID_pointer)
1878 else if(template_type.
id()==ID_array)
1880 const typet &desired_type_followed=
1883 if(desired_type_followed.
id()==ID_array)
1888 desired_type_followed.
subtype());
1909 assert(expr.
id()==ID_symbol);
1917 if(cpp_declaration.is_class_template())
1929 const symbolt &template_symbol=
1937 cpp_declaration.template_type());
1940 assert(cpp_declaration.declarators().size()==1);
1943 cpp_declaration.declarators().front();
1946 if(function_declarator.type().id()!=ID_function_type)
1950 <<
"expected function type for function template" 1962 if(template_scope==
nullptr)
1966 << template_identifier <<
'\n' 1967 <<
"function template instantiation error" 1977 function_declarator.type().find(ID_parameters).get_sub();
1979 exprt::operandst::const_iterator it=fargs.
operands.begin();
1980 for(
const auto ¶meter : parameters)
1985 if(parameter.id()==ID_cpp_declaration)
1996 merge_type(arg_declaration.
type());
2013 cpp_declaration.template_type());
2020 typet function_type=
2021 function_declarator.merge_type(cpp_declaration.type());
2027 function_type.
set(ID_C_template, template_symbol.
name);
2028 function_type.
set(ID_C_template_arguments, template_args);
2032 exprt template_function_instance(
2033 ID_template_function_instance, function_type);
2035 return template_function_instance;
2043 if(expr.
id()!=ID_symbol)
2046 const symbolt &template_symbol=
2053 if(template_args_non_tc.
is_nil())
2074 template_args_non_tc);
2113 code_type.
parameters()[0].get(ID_C_base_name)==ID_this)
2120 fargs.
operands.begin()->type().get(ID_identifier));
2122 assert(type_symb.
type.
id()==ID_struct);
2127 assert(struct_type.has_component(new_symbol.
name));
2129 member.set_component_name(new_symbol.
name);
2130 member.struct_op()=*fargs.
operands.begin();
2144 unsigned &args_distance,
2154 if(expr.
id()==ID_member ||
2164 assert(parameter.
get(ID_C_base_name)==ID_this);
2170 exprt object(ID_symbol, object_type);
2171 object.set(ID_C_lvalue,
true);
2180 fargs.
operands.size() == parameters.size())
2212 for(cpp_scopest::id_sett::const_iterator
2219 if(
id.is_class() ||
id.is_enum() ||
id.is_namespace())
2222 assert(
id.is_scope);
2223 new_set.insert(&
id);
2225 else if(
id.is_typedef())
2237 assert(pcomp.
get_bool(ID_is_type));
2239 assert(type.id()!=ID_struct);
2240 if(type.id()==ID_symbol)
2241 identifier=type.get(ID_identifier);
2252 if(symbol.
type.
id()==ID_struct)
2259 new_set.insert(&class_id);
2262 else if(symbol.
type.
id()==ID_symbol)
2263 identifier=symbol.
type.
get(ID_identifier);
2276 if(symbol.
type.
get(ID_type)==ID_struct)
2278 id.print(std::cout);
2279 assert(
id.is_scope);
2280 new_set.insert(&
id);
2299 std::cout <<
"E: " << e.
pretty() <<
'\n';
2305 if(e.
type().
id()==ID_symbol)
2316 if(symbol.
type.
id()==ID_symbol)
2318 else if(symbol.
type.
id()==ID_struct ||
2319 symbol.
type.
id()==ID_incomplete_struct ||
2320 symbol.
type.
id()==ID_union ||
2321 symbol.
type.
id()==ID_incomplete_union ||
2322 symbol.
type.
id()==ID_c_enum)
2329 new_set.insert(&class_id);
2346 for(cpp_scopest::id_sett::iterator
2351 if((*it)->is_namespace())
2355 cpp_scopest::id_sett::iterator old(it);
2368 for(
const auto &arg : fargs.
operands)
2372 if(final_type.
id()!=ID_struct && final_type.
id()!=ID_union)
2379 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.
const typet & follow(const typet &src) const
virtual bool lookup(const irep_idt &name, const symbolt *&symbol) const
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
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)
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
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.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
cpp_template_args_tct full_args
bool is_class_template() const
const irep_idt & id() const
const source_locationt & source_location() const
const array_typet & to_array_type(const typet &type)
Cast a generic typet to an array_typet.
void elaborate_class_template(const typet &type)
elaborate class template instances
const declaratorst & declarators() const
const symbol_typet & to_symbol_type(const typet &type)
Cast a generic typet to a symbol_typet.
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
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.
irep_idt class_identifier
void add_object(const exprt &expr)
C++ Language Type Checking.
bool has_prefix(const std::string &s, const std::string &prefix)
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 follow_symbol(irept &irep) const
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)
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
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
cpp_scopet & current_scope()
void build_unassigned(const template_typet &template_type)
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)
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
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)
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
void make_typecast(const typet &_type)
const irept & find(const irep_namet &name) const
const typet & return_type() const
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.