38 original_scope(nullptr)
47 for(cpp_scopest::id_sett::const_iterator
60 identifiers.push_back(e);
71 old_identifiers.swap(identifiers);
73 for(resolve_identifierst::const_iterator
74 it=old_identifiers.begin();
75 it!=old_identifiers.end();
86 identifiers.push_back(e);
97 old_identifiers.swap(identifiers);
99 for(resolve_identifierst::const_iterator
100 it=old_identifiers.begin();
101 it!=old_identifiers.end();
108 assert(e.
id()!=ID_type);
109 identifiers.push_back(e);
116 if(identifiers.size()==1)
119 exprt e=*identifiers.begin();
120 assert(e.
id()==ID_template_function_instance);
122 const symbolt &template_symbol=
138 identifiers.push_back(
147 old_identifiers.swap(identifiers);
149 for(resolve_identifierst::const_iterator
150 it=old_identifiers.begin();
151 it!=old_identifiers.end();
155 identifiers.push_back(*it);
163 old_identifiers.swap(identifiers);
165 std::set<irep_idt> ids;
166 std::set<exprt> other;
168 for(resolve_identifierst::const_iterator
169 it=old_identifiers.begin();
170 it!=old_identifiers.end();
175 if(it->id()==ID_symbol)
177 else if(it->id()==ID_type && it->type().id()==ID_symbol)
182 if(other.insert(*it).second)
183 identifiers.push_back(*it);
187 if(ids.insert(
id).second)
188 identifiers.push_back(*it);
197 std::cout <<
"RESOLVE MAP:" << std::endl;
209 <<
"without instance:\n" 234 const symbolt &compound_symbol=
237 assert(compound_symbol.
type.
id()==ID_struct ||
238 compound_symbol.
type.
id()==ID_union);
243 const exprt component=
244 struct_union_type.get_component(identifier.
identifier);
268 this_class_identifier <<
'\n';
271 const exprt &this_expr=
283 assert(this_expr.
type().
id()==ID_pointer);
286 object.type().set(ID_C_constant,
288 object.set(ID_C_lvalue,
true);
295 if(object_type.
id()==ID_struct ||
296 object_type.
id()==ID_union)
307 if(
object.is_not_nil())
346 else if(symbol.
type.
id()==ID_c_enum)
363 bool constant=followed_type.
get_bool(ID_C_constant);
365 while(followed_type.
id()==ID_symbol)
369 constant |= followed_type.
get_bool(ID_C_constant);
375 symbol.
value.
id() == ID_constant)
396 old_identifiers.swap(identifiers);
398 for(resolve_identifierst::const_iterator
399 it=old_identifiers.begin();
400 it!=old_identifiers.end();
408 match=(it->id()==ID_type);
412 match=(it->id()!=ID_type);
424 identifiers.push_back(*it);
436 old_identifiers.swap(identifiers);
441 for(resolve_identifierst::const_iterator
442 it=old_identifiers.begin();
443 it!=old_identifiers.end();
449 identifiers.push_back(*it);
458 old_identifiers.swap(identifiers);
461 std::multimap<std::size_t, exprt> distance_map;
463 for(resolve_identifierst::const_iterator
464 it=old_identifiers.begin();
465 it!=old_identifiers.end();
468 unsigned args_distance;
472 std::size_t template_distance=0;
474 if(it->type().get(ID_C_template)!=
"")
475 template_distance=it->type().
476 find(ID_C_template_arguments).find(ID_arguments).get_sub().size();
480 std::size_t total_distance=
482 1000*template_distance+args_distance;
485 std::pair<std::size_t, exprt>(total_distance, *it));
492 if(!distance_map.empty())
494 std::size_t distance=distance_map.begin()->first;
496 for(std::multimap<std::size_t, exprt>::const_iterator
497 it=distance_map.begin();
498 it!=distance_map.end() && it->first==distance;
500 identifiers.push_back(it->second);
503 if(identifiers.size()>1 && fargs.
in_use)
507 for(resolve_identifierst::iterator
508 it1=identifiers.begin();
509 it1!=identifiers.end();
512 if(it1->type().id()!=ID_code)
518 for(resolve_identifierst::iterator it2=
520 it2!=identifiers.end();
529 if(it2->type().id()!=ID_code)
545 i<f1.
parameters().size() && (f1_better || f2_better);
557 if(type1.
id()==ID_pointer)
563 if(type2.
id()==ID_pointer)
572 if(followed1.
id() != ID_struct || followed2.
id() != ID_struct)
588 resolve_identifierst::iterator prev_it=it2;
591 if(f1_better && !f2_better)
592 identifiers.erase(prev_it);
603 for(resolve_identifierst::iterator
604 it=identifiers.begin();
605 it!=identifiers.end();
608 if(it->id()!=ID_type)
611 new_identifiers.push_back(*it);
615 const typet &symbol_type=
627 exprt pod_constructor1(
"pod_constructor", t1);
628 new_identifiers.push_back(pod_constructor1);
634 exprt pod_constructor2(
"pod_constructor", t2);
635 new_identifiers.push_back(pod_constructor2);
639 if(symbol_type.
id()==ID_c_enum_tag)
642 exprt pod_constructor3(
"pod_constructor", t3);
643 new_identifiers.push_back(pod_constructor3);
646 else if(symbol_type.
id()==ID_struct)
654 for(struct_typet::componentst::const_iterator
655 itc=components.begin();
656 itc!=components.end();
662 if(component.
get_bool(ID_from_base))
665 if(type.
find(ID_return_type).
id()==ID_constructor)
671 new_identifiers.push_back(e);
677 identifiers.
swap(new_identifiers);
684 if(argument.
id()==
"ambiguous")
704 if(base_name==ID_unsignedbv ||
705 base_name==ID_signedbv)
707 if(arguments.size()!=1)
711 << base_name <<
" expects one template argument, but got " 716 exprt argument=arguments.front();
718 if(argument.
id()==ID_type)
722 << base_name <<
" expects one integer template argument, " 742 <<
"template argument must be greater than zero" 750 else if(base_name==ID_fixedbv)
752 if(arguments.size()!=2)
756 << base_name <<
" expects two template arguments, but got " 761 exprt argument0=arguments[0];
763 exprt argument1=arguments[1];
766 if(argument0.
id()==ID_type)
770 << base_name <<
" expects two integer template arguments, " 775 if(argument1.
id()==ID_type)
779 << base_name <<
" expects two integer template arguments, " 806 <<
"template argument must be greater than zero" 815 <<
"template argument must be greater or equal zero" 820 if(integer_bits>width)
824 <<
"template argument must be smaller or equal width" 833 else if(base_name==ID_integer)
835 if(!arguments.empty())
839 << base_name <<
" expects no template arguments" 851 else if(base_name==
"dump_scopes")
859 else if(base_name==
"current_scope")
866 else if(base_name == ID_size_t)
870 else if(base_name == ID_ssize_t)
893 assert(cpp_name.
id()==ID_cpp_name);
894 assert(!cpp_name.
get_sub().empty());
899 irept::subt::const_iterator
pos=cpp_name.
get_sub().begin();
911 std::string final_base_name=
"";
916 if(
pos->id()==ID_name)
917 final_base_name+=
pos->get_string(ID_identifier);
918 else if(
pos->id()==ID_template_args)
920 else if(
pos->id()==
"::")
937 std::cout <<
"X: " <<
id_set.size() <<
'\n';
974 << final_base_name <<
"' is ambiguous" 993 final_base_name.clear();
995 else if(
pos->id()==ID_operator)
997 final_base_name+=
"operator";
999 irept::subt::const_iterator next=
pos+1;
1000 assert(next != cpp_name.
get_sub().end());
1002 if(next->id() == ID_cpp_name ||
1003 next->id() == ID_pointer ||
1004 next->id() == ID_int ||
1005 next->id() == ID_char ||
1006 next->id() == ID_bool ||
1007 next->id() == ID_merged_type)
1010 irept next_ir=*next;
1012 op_name.
swap(next_ir);
1019 final_base_name+=
pos->id_string();
1024 base_name=final_base_name;
1044 std::set<irep_idt> primary_templates;
1046 for(cpp_scopest::id_sett::const_iterator
1051 const irep_idt id=(*it)->identifier;
1059 if(specialization_of!=
"")
1060 primary_templates.insert(specialization_of);
1062 primary_templates.insert(
id);
1065 assert(!primary_templates.empty());
1067 if(primary_templates.size()>=2)
1076 const symbolt &primary_template_symbol=
1089 full_template_args_tc=
1092 primary_template_symbol,
1093 full_template_args);
1099 std::vector<matcht> matches;
1103 matcht(full_template_args_tc, full_template_args_tc,
1104 primary_template_symbol.
name));
1106 for(cpp_scopest::id_sett::const_iterator
1111 const irep_idt id=(*it)->identifier;
1115 if(specialization_of==
"")
1133 assert(full_template_args_tc.
arguments().size()==
1134 partial_specialization_args.
arguments().size());
1142 if(template_scope==
nullptr)
1146 <<
"class template instantiation error" 1154 for(std::size_t i=0; i<full_template_args_tc.
arguments().size(); i++)
1156 if(full_template_args_tc.
arguments()[i].id()==ID_type)
1158 full_template_args_tc.
arguments()[i].type());
1177 primary_template_symbol,
1178 partial_specialization_args);
1182 assert(partial_specialization_args_tc.
arguments().size()==
1183 full_template_args_tc.
arguments().size());
1185 if(partial_specialization_args_tc==
1186 full_template_args_tc)
1188 matches.push_back(
matcht(
1189 guessed_template_args, full_template_args_tc,
id));
1194 assert(!matches.empty());
1196 std::sort(matches.begin(), matches.end());
1199 for(std::vector<matcht>::const_iterator
1200 m_it=matches.begin();
1201 m_it!=matches.end();
1204 std::cout <<
"M: " << m_it->cost
1205 <<
" " << m_it->id <<
'\n';
1211 const matcht &match=*matches.begin();
1225 if(instance.
type.
id()!=ID_struct &&
1226 instance.
type.
id()!=ID_incomplete_struct)
1230 << base_name <<
"' is not a class";
1285 else if(
id_set.size()==1)
1305 for(resolve_identifierst::const_iterator
1306 it=identifiers.begin();
1307 it!=identifiers.end();
1310 const exprt &id_expr=*it;
1314 if(id_expr.
id()==ID_type)
1325 if(id_expr.
id()==ID_member)
1330 else if(id_expr.
id()==
"pod_constructor")
1332 out <<
"constructor ";
1335 else if(id_expr.
id()==ID_template_function_instance)
1348 else if(id_expr.
type().
id()==ID_code)
1354 out <<
" " <<
id <<
"(";
1356 for(code_typet::parameterst::const_iterator
1357 it=parameters.begin(); it!=parameters.end(); it++)
1359 const typet ¶meter_type=it->type();
1361 if(it!=parameters.begin())
1369 if(!parameters.empty())
1379 if(id_expr.
id()==ID_symbol)
1382 out <<
" (" << symbol.
location <<
")";
1384 else if(id_expr.
id()==ID_template_function_instance)
1388 out <<
" (" << symbol.
location <<
")";
1400 bool fail_with_exception)
1413 std::cout <<
"base name: " << base_name << std::endl;
1414 std::cout <<
"template args: " << template_args.
pretty() << std::endl;
1416 std::cout <<
"scope: " 1427 return do_builtin(base_name, fargs, template_args);
1431 if(base_name==
"__func__" ||
1432 base_name==
"__FUNCTION__" ||
1433 base_name==
"__PRETTY_FUNCTION__")
1449 if(template_args.
is_nil())
1452 base_name, lookup_kind,
id_set);
1461 id_set.insert(&builtin_id);
1477 if(!fail_with_exception)
1487 << base_name <<
"' not found";
1500 << base_name <<
"' is unknown";
1515 bool have_classes=
false, have_methods=
false;
1517 for(cpp_scopest::id_sett::const_iterator
1522 const irep_idt id=(*it)->identifier;
1531 if(want==
wantt::BOTH && have_classes && have_methods)
1533 if(!fail_with_exception)
1539 <<
"template symbol `" 1551 identifiers.push_back(
exprt(ID_type, instance));
1557 id_set, fargs, identifiers);
1560 identifiers, template_args, fargs);
1566 id_set, fargs, identifiers);
1573 filter(identifiers, want);
1576 std::cout <<
"P0 " << base_name <<
" " << identifiers.
size() <<
"\n";
1589 std::cout <<
"P1 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1598 std::cout <<
"P2 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1604 if(new_identifiers.empty())
1606 new_identifiers=identifiers;
1608 if(template_args.
is_nil())
1612 if(new_identifiers.empty())
1613 new_identifiers=identifiers;
1619 std::cout <<
"P3 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1628 std::cout <<
"P4 " << base_name <<
" " << new_identifiers.
size() <<
"\n";
1633 if(new_identifiers.size()==1)
1635 result=*new_identifiers.begin();
1640 if(!fail_with_exception)
1643 if(new_identifiers.empty())
1647 <<
"found no match for symbol `" << base_name
1648 <<
"', candidates are:\n";
1655 <<
"symbol `" << base_name
1656 <<
"' does not uniquely resolve:\n";
1660 exprt e1=*new_identifiers.begin();
1661 exprt e2=*(++new_identifiers.begin());
1668 << (e1.get(ID_identifier)==e2.
get(ID_identifier))
1670 cpp_typecheck.str <<
"e1.iden:: " << e1.get(ID_identifier) <<
'\n';
1679 for(exprt::operandst::const_iterator
1700 if(result.
get_bool(ID_C_not_accessible))
1703 if(!fail_with_exception)
1708 <<
"error: member `" << result.
get(
"component_name").
c_str()
1709 <<
"' is not accessible";
1719 if(!fail_with_exception)
1725 <<
"error: expected expression, but got type `" 1734 if(result.
id()!=ID_type)
1736 if(!fail_with_exception)
1742 <<
"error: expected type, but got expression `" 1758 const exprt &template_expr,
1759 const exprt &desired_expr)
1761 if(template_expr.
id()==ID_cpp_name)
1779 for(cpp_scopest::id_sett::const_iterator it=
id_set.begin();
1789 if(e.
id()==ID_unassigned)
1793 if(e.
type()!=old_type)
1803 const typet &template_type,
1804 const typet &desired_type)
1837 std::cout <<
"TT: " << template_type.
pretty() <<
'\n';
1838 std::cout <<
"DT: " << desired_type.
pretty() <<
'\n';
1841 if(template_type.
id()==ID_cpp_name)
1869 for(cpp_scopest::id_sett::const_iterator
1881 if(t.
id()==ID_unassigned)
1889 std::cout <<
"ASSIGN " <<
id.identifier <<
" := " 1898 else if(template_type.
id()==ID_merged_type)
1901 for(typet::subtypest::const_iterator
1902 it=template_type.
subtypes().begin();
1903 it!=template_type.
subtypes().end();
1914 else if(template_type.
id()==ID_pointer)
1916 const typet &desired_type_followed=
1919 if(desired_type_followed.
id()==ID_pointer)
1923 else if(template_type.
id()==ID_array)
1925 const typet &desired_type_followed=
1928 if(desired_type_followed.
id()==ID_array)
1933 desired_type_followed.
subtype());
1953 assert(expr.
id()==ID_symbol);
1961 if(cpp_declaration.is_class_template())
1973 const symbolt &template_symbol=
1981 cpp_declaration.template_type());
1984 assert(cpp_declaration.declarators().size()==1);
1987 cpp_declaration.declarators().front();
1990 if(function_declarator.type().id()!=ID_function_type)
1994 <<
"expected function type for function template" 2006 if(template_scope==
nullptr)
2010 << template_identifier <<
'\n' 2011 <<
"function template instantiation error" 2021 function_declarator.type().find(ID_parameters).get_sub();
2023 exprt::operandst::const_iterator it=fargs.
operands.begin();
2024 for(
const auto ¶meter : parameters)
2029 if(parameter.id()==ID_cpp_declaration)
2040 merge_type(arg_declaration.
type());
2057 cpp_declaration.template_type());
2064 typet function_type=
2065 function_declarator.merge_type(cpp_declaration.type());
2071 function_type.
set(ID_C_template, template_symbol.
name);
2072 function_type.
set(ID_C_template_arguments, template_args);
2076 exprt template_function_instance(
2077 ID_template_function_instance, function_type);
2079 return template_function_instance;
2087 if(expr.
id()!=ID_symbol)
2090 const symbolt &template_symbol =
2097 if(template_args_non_tc.
is_nil())
2118 template_args_non_tc);
2157 code_type.
parameters()[0].get(ID_C_base_name)==ID_this)
2164 fargs.
operands.begin()->type().get(ID_identifier));
2166 assert(type_symb.
type.
id()==ID_struct);
2172 "method should exist in struct");
2191 unsigned &args_distance,
2201 if(expr.
id()==ID_member ||
2211 assert(parameter.
get(ID_C_base_name)==ID_this);
2218 object.set(ID_C_lvalue,
true);
2228 fargs.
operands.size() == parameters.size())
2260 for(cpp_scopest::id_sett::const_iterator
2267 if(
id.is_class() ||
id.is_enum() ||
id.is_namespace())
2270 assert(
id.is_scope);
2271 new_set.insert(&
id);
2273 else if(
id.is_typedef())
2285 assert(pcomp.
get_bool(ID_is_type));
2287 assert(type.id()!=ID_struct);
2288 if(type.id()==ID_symbol)
2300 if(symbol.
type.
id()==ID_struct)
2307 new_set.insert(&class_id);
2310 else if(symbol.
type.
id()==ID_symbol)
2324 if(symbol.
type.
get(ID_type)==ID_struct)
2326 id.print(std::cout);
2327 assert(
id.is_scope);
2328 new_set.insert(&
id);
2347 std::cout <<
"E: " << e.
pretty() <<
'\n';
2353 if(e.
type().
id()==ID_symbol)
2364 if(symbol.
type.
id()==ID_symbol)
2366 else if(symbol.
type.
id()==ID_struct ||
2367 symbol.
type.
id()==ID_incomplete_struct ||
2368 symbol.
type.
id()==ID_union ||
2369 symbol.
type.
id()==ID_incomplete_union ||
2370 symbol.
type.
id()==ID_c_enum)
2377 new_set.insert(&class_id);
2394 for(cpp_scopest::id_sett::iterator
2399 if((*it)->is_namespace())
2403 cpp_scopest::id_sett::iterator old(it);
2416 for(
const auto &arg : fargs.
operands)
2420 if(final_type.
id()!=ID_struct && final_type.
id()!=ID_union)
2427 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.
void convert_identifiers(const cpp_scopest::id_sett &id_set, const cpp_typecheck_fargst &fargs, resolve_identifierst &identifiers)
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)
void resolve_argument(exprt &argument, const cpp_typecheck_fargst &fargs)
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
exprt do_builtin(const irep_idt &base_name, const cpp_typecheck_fargst &fargs, const cpp_template_args_non_tct &template_args)
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()
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.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
exprt convert_identifier(const cpp_idt &id, const cpp_typecheck_fargst &fargs)
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)
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.