16 #include "abg-reporter-priv.h"
38 apply_filters_and_suppressions_before_reporting();
69 const string& indent)
const
76 string name = f->get_pretty_representation();
81 if (f->get_visibility() != s->get_visibility())
84 <<
"visibility changed from '"
85 << f->get_visibility() <<
"' to '" << s->get_visibility()
89 if (f->get_linkage_name() != s->get_linkage_name())
92 <<
"mangled name changed from '"
93 << f->get_linkage_name() <<
"' to "
94 << s->get_linkage_name()
107 default_reporter::report(
const enum_diff& d, ostream& out,
108 const string& indent)
const
110 if (!d.to_be_reported())
113 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3(d.first_subject(),
117 string name = d.first_enum()->get_pretty_representation();
128 first->get_is_declaration_only()
129 ?
" was a declaration-only enum type"
130 :
" was a defined enum type";
133 second->get_is_declaration_only()
134 ?
" and is now a declaration-only enum type"
135 :
" and is now a defined enum type";
137 out << indent <<
"enum type " << name << was << is_now <<
"\n";
146 d.underlying_type_diff()->report(out, indent);
149 unsigned numdels = d.deleted_enumerators().size();
150 unsigned numins = d.inserted_enumerators().size();
151 unsigned numchanges = d.changed_enumerators().size();
158 for (enum_type_decl::enumerators::const_iterator i =
159 sorted_deleted_enumerators.begin();
160 i != sorted_deleted_enumerators.end();
165 << (first->get_is_anonymous()
167 : i->get_qualified_name())
179 for (enum_type_decl::enumerators::const_iterator i =
180 sorted_inserted_enumerators.begin();
181 i != sorted_inserted_enumerators.end();
186 << (second->get_is_anonymous()
188 :i->get_qualified_name())
200 sorted_changed_enumerators);
201 for (changed_enumerators_type::const_iterator i =
202 sorted_changed_enumerators.begin();
203 i != sorted_changed_enumerators.end();
208 << (first->get_is_anonymous()
209 ? i->first.get_name()
210 : i->first.get_qualified_name())
212 << i->first.get_value() <<
"' to '"
213 << i->second.get_value() <<
"'";
219 if (ctxt->show_leaf_changes_only())
222 d.reported_once(
true);
239 const string& indent)
const
249 && ((d.
context()->get_allowed_category()
251 || d.
context()->show_leaf_changes_only()))
252 || f->get_qualified_name() != s->get_qualified_name())
254 out << indent <<
"typedef name changed from "
255 << f->get_qualified_name()
257 << s->get_qualified_name();
274 const string& indent)
const
285 if (dif && dif->has_changes())
287 if (dif->to_be_reported())
289 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(dif,
292 <<
"underlying type '"
293 << dif->first_subject()->get_pretty_representation() <<
"'";
295 out <<
" changed:\n";
296 dif->report(out, indent +
" ");
311 <<
"underlying type '"
312 << dif->first_subject()->get_pretty_representation() <<
"'";
314 out <<
" changed:\n";
316 dif->set_category(c & ~REDUNDANT_CATEGORY);
317 dif->report(out, indent +
" ");
318 if (c & REDUNDANT_CATEGORY)
319 dif->set_category(c | REDUNDANT_CATEGORY);
341 const string& indent)
const
351 out << indent <<
"'" << fname <<
"' changed to '" << sname <<
"'\n";
378 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(dif,
382 string fltname = dif->first_subject()->get_pretty_representation();
383 out << indent <<
"in unqualified underlying type '" << fltname <<
"'";
386 dif->report(out, indent +
" ");
398 const string& indent)
const
425 default_reporter::report(
const pointer_diff& d, ostream& out,
426 const string& indent)
const
433 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(dif,
"pointed to type");
434 string repr = dif->first_subject()
435 ? dif->first_subject()->get_pretty_representation()
439 <<
"in pointed to type '" << repr <<
"'";
442 dif->report(out, indent +
" ");
457 const string& indent)
const
465 string f_repr = f->get_pretty_representation(),
466 s_repr = s->get_pretty_representation();
468 if (f->is_lvalue() != s->is_lvalue())
472 out <<
"lvalue reference type '" << f_repr
473 <<
" became an rvalue reference type: '"
477 out <<
"rvalue reference type '" << f_repr
478 <<
" became an lvalue reference type: '"
483 s->get_pointed_to_type().get()))
485 <<
"reference type changed from: '"
486 << f_repr <<
"' to: '" << s_repr <<
"'\n";
498 const string& indent)
const
513 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(dif,
517 <<
"in referenced type '"
518 << dif->first_subject()->get_pretty_representation() <<
"'";
521 dif->report(out, indent +
" ");
533 default_reporter::report(
const fn_parm_diff& d, ostream& out,
534 const string& indent)
const
536 if (!d.to_be_reported())
540 s = d.second_parameter();
546 bool has_sub_type_change =
548 d.second_parameter()->get_type());
554 if (f->get_is_artificial())
556 out <<
"parameter " << f->get_index();
559 << f->get_type_pretty_representation();
561 if (has_sub_type_change)
562 out <<
"' has sub-type changes:\n";
564 out <<
"' changed:\n";
566 type_diff->report(out, indent +
" ");
580 const string& indent)
const
592 if (fft->get_size_in_bits() != sft->get_size_in_bits())
594 out << indent <<
"address size of function changed from "
595 << fft->get_size_in_bits()
597 << sft->get_size_in_bits()
602 if (fft->get_alignment_in_bits()
603 != sft->get_alignment_in_bits())
605 out << indent <<
"address alignment of function changed from "
606 << fft->get_alignment_in_bits()
608 << sft->get_alignment_in_bits()
616 for (vector<function_decl::parameter_sptr>::const_iterator i =
617 d.priv_->sorted_deleted_parms_.begin();
618 i != d.priv_->sorted_deleted_parms_.end();
621 out << indent <<
"parameter " << (*i)->get_index()
622 <<
" of type '" << (*i)->get_type_pretty_representation()
623 <<
"' was removed\n";
627 for (vector<function_decl::parameter_sptr>::const_iterator i =
628 d.priv_->sorted_added_parms_.begin();
629 i != d.priv_->sorted_added_parms_.end();
632 out << indent <<
"parameter " << (*i)->get_index()
633 <<
" of type '" << (*i)->get_type_pretty_representation()
647 const string& indent)
const
656 corpus_sptr fc = ctxt->get_first_corpus();
657 corpus_sptr sc = ctxt->get_second_corpus();
660 if (d.priv_->return_type_diff_
661 && d.priv_->return_type_diff_->to_be_reported())
663 out << indent <<
"return type changed:\n";
664 d.priv_->return_type_diff_->report(out, indent +
" ");
668 for (vector<fn_parm_diff_sptr>::const_iterator i =
669 d.priv_->sorted_subtype_changed_parms_.begin();
670 i != d.priv_->sorted_subtype_changed_parms_.end();
674 if (dif && dif->to_be_reported())
675 dif->report(out, indent);
692 const std::string& indent)
const
697 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3(d.
first_subrange(),
712 default_reporter::report(
const array_diff& d, ostream& out,
713 const string& indent)
const
718 string name = d.
first_array()->get_pretty_representation();
719 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3(d.
first_array(),
724 if (dif->to_be_reported())
728 out << indent <<
"array element type '"
729 << fn <<
"' changed:\n";
730 dif->report(out, indent +
" ");
748 default_reporter::report(
const base_diff& d, ostream& out,
749 const string& indent)
const
751 if (!d.to_be_reported())
755 string repr = f->get_base_class()->get_pretty_representation();
756 bool emitted =
false;
758 if (!d.is_filtered_out_without_looking_at_allowed_changes())
760 if (f->get_is_static() != s->get_is_static())
762 if (f->get_is_static())
763 out << indent <<
"is no more static";
765 out << indent <<
"now becomes static";
770 && (f->get_access_specifier() != s->get_access_specifier()))
775 out <<
"has access changed from '"
776 << f->get_access_specifier()
778 << s->get_access_specifier()
786 if (dif->to_be_reported())
790 dif->report(out, indent);
803 default_reporter::report(
const scope_diff& d, ostream& out,
804 const string& indent)
const
806 if (!d.to_be_reported())
810 unsigned num_changed_types = d.changed_types().size();
811 if (num_changed_types == 0)
813 else if (num_changed_types == 1)
814 out << indent <<
"1 changed type:\n";
816 out << indent << num_changed_types <<
" changed types:\n";
818 for (diff_sptrs_type::const_iterator dif = d.changed_types().begin();
819 dif != d.changed_types().end();
825 out << indent <<
" '"
826 << (*dif)->first_subject()->get_pretty_representation()
828 (*dif)->report(out, indent +
" ");
832 unsigned num_changed_decls = d.changed_decls().size();
833 if (num_changed_decls == 0)
835 else if (num_changed_decls == 1)
836 out << indent <<
"1 changed declaration:\n";
838 out << indent << num_changed_decls <<
" changed declarations:\n";
840 for (diff_sptrs_type::const_iterator dif= d.changed_decls().begin();
841 dif != d.changed_decls().end ();
847 out << indent <<
" '"
848 << (*dif)->first_subject()->get_pretty_representation()
849 <<
"' was changed to '"
850 << (*dif)->second_subject()->get_pretty_representation() <<
"'";
854 (*dif)->report(out, indent +
" ");
858 for (string_decl_base_sptr_map::const_iterator i =
859 d.priv_->deleted_types_.begin();
860 i != d.priv_->deleted_types_.end();
864 << i->second->get_pretty_representation()
865 <<
"' was removed\n";
867 if (d.priv_->deleted_types_.size())
870 for (string_decl_base_sptr_map::const_iterator i =
871 d.priv_->deleted_decls_.begin();
872 i != d.priv_->deleted_decls_.end();
876 << i->second->get_pretty_representation()
877 <<
"' was removed\n";
879 if (d.priv_->deleted_decls_.size())
883 bool emitted =
false;
884 for (string_decl_base_sptr_map::const_iterator i =
885 d.priv_->inserted_types_.begin();
886 i != d.priv_->inserted_types_.end();
891 if (dynamic_pointer_cast<type_decl>(i->second))
895 << i->second->get_pretty_representation()
904 for (string_decl_base_sptr_map::const_iterator i =
905 d.priv_->inserted_decls_.begin();
906 i != d.priv_->inserted_decls_.end();
911 if (dynamic_pointer_cast<type_decl>(i->second))
915 << i->second->get_pretty_representation()
933 default_reporter::report(
const class_or_union_diff& d,
935 const string& indent)
const
937 if (!d.to_be_reported())
940 class_or_union_sptr first = d.first_class_or_union(),
941 second = d.second_class_or_union();
950 first->get_is_declaration_only()
951 ?
" was a declaration-only type"
952 :
" was a defined type";
955 second->get_is_declaration_only()
956 ?
" and is now a declaration-only type"
957 :
" and is now a defined type";
959 out << indent <<
"type " << first->get_pretty_representation()
960 << was << is_now <<
"\n";
965 if (d.member_fns_changes())
968 int numdels = d.get_priv()->deleted_member_functions_.size();
969 size_t num_filtered =
970 d.get_priv()->count_filtered_deleted_mem_fns(ctxt);
973 "member function", indent);
974 for (class_or_union::member_functions::const_iterator i =
975 d.get_priv()->sorted_deleted_member_functions_.begin();
976 i != d.get_priv()->sorted_deleted_member_functions_.end();
979 if (!(ctxt->get_allowed_category()
984 method_decl_sptr mem_fun = *i;
985 out << indent <<
" ";
990 int numins = d.get_priv()->inserted_member_functions_.size();
991 num_filtered = d.get_priv()->count_filtered_inserted_mem_fns(ctxt);
994 "member function", indent);
995 for (class_or_union::member_functions::const_iterator i =
996 d.get_priv()->sorted_inserted_member_functions_.begin();
997 i != d.get_priv()->sorted_inserted_member_functions_.end();
1000 if (!(ctxt->get_allowed_category()
1005 method_decl_sptr mem_fun = *i;
1006 out << indent <<
" ";
1011 int numchanges = d.get_priv()->sorted_changed_member_functions_.size();
1012 num_filtered = d.get_priv()->count_filtered_changed_mem_fns(ctxt);
1015 "member function", indent);
1016 for (function_decl_diff_sptrs_type::const_iterator i =
1017 d.get_priv()->sorted_changed_member_functions_.begin();
1018 i != d.get_priv()->sorted_changed_member_functions_.end();
1021 if (!(ctxt->get_allowed_category()
1024 ((*i)->first_function_decl()))
1026 ((*i)->second_function_decl())))
1030 if (!diff || !diff->to_be_reported())
1034 (*i)->first_function_decl()->get_pretty_representation();
1035 out << indent <<
" '" << repr <<
"' has some sub-type changes:\n";
1036 diff->report(out, indent +
" ");
1041 if (d.data_members_changes())
1044 int numdels = d.class_or_union_diff::get_priv()->
1045 get_deleted_non_static_data_members_number();
1049 "data member", indent);
1050 vector<decl_base_sptr> sorted_dms;
1052 (d.class_or_union_diff::get_priv()->deleted_data_members_,
1054 for (vector<decl_base_sptr>::const_iterator i = sorted_dms.begin();
1055 i != sorted_dms.end();
1059 dynamic_pointer_cast<var_decl>(*i);
1069 d.class_or_union_diff::get_priv()->inserted_data_members_.size();
1073 "data member", indent);
1074 vector<decl_base_sptr> sorted_dms;
1076 (d.class_or_union_diff::get_priv()->inserted_data_members_,
1078 for (vector<decl_base_sptr>::const_iterator i = sorted_dms.begin();
1079 i != sorted_dms.end();
1083 dynamic_pointer_cast<var_decl>(*i);
1090 size_t num_changes =
1091 (d.sorted_subtype_changed_data_members().size()
1092 + d.sorted_changed_data_members().size());
1094 size_t num_changes_filtered =
1095 (d.count_filtered_subtype_changed_data_members()
1096 + d.count_filtered_changed_data_members());
1101 change_kind,
"data member", indent);
1103 for (var_diff_sptrs_type::const_iterator it =
1104 d.sorted_changed_data_members().begin();
1105 it != d.sorted_changed_data_members().end();
1107 if ((*it)->to_be_reported())
1108 represent(*it, ctxt, out, indent +
" ");
1110 for (var_diff_sptrs_type::const_iterator it =
1111 d.sorted_subtype_changed_data_members().begin();
1112 it != d.sorted_subtype_changed_data_members().end();
1114 if ((*it)->to_be_reported())
1115 represent(*it, ctxt, out, indent +
" ");
1124 if (
const edit_script& e = d.member_types_changes())
1127 d.class_or_union_diff::get_priv()->sorted_changed_member_types_.size();
1129 d.class_or_union_diff::get_priv()->deleted_member_types_.size();
1135 "member type", indent);
1137 for (string_decl_base_sptr_map::const_iterator i =
1138 d.class_or_union_diff::get_priv()->deleted_member_types_.begin();
1139 i != d.class_or_union_diff::get_priv()->deleted_member_types_.end();
1142 decl_base_sptr mem_type = i->second;
1143 out << indent <<
" '"
1144 << mem_type->get_pretty_representation()
1153 "member type", indent);
1155 for (diff_sptrs_type::const_iterator it =
1156 d.class_or_union_diff::get_priv()->sorted_changed_member_types_.begin();
1157 it != d.class_or_union_diff::get_priv()->sorted_changed_member_types_.end();
1160 if (!(*it)->to_be_reported())
1165 out << indent <<
" '"
1166 << o->get_pretty_representation()
1170 (*it)->report(out, indent +
" ");
1176 int numins = e.num_insertions();
1178 numins -= numchanges;
1183 "member type", indent);
1185 for (vector<insertion>::const_iterator i = e.insertions().begin();
1186 i != e.insertions().end();
1189 type_base_sptr mem_type;
1190 for (vector<unsigned>::const_iterator j =
1191 i->inserted_indexes().begin();
1192 j != i->inserted_indexes().end();
1195 mem_type = second->get_member_types()[*j];
1196 if (!d.class_or_union_diff::get_priv()->
1199 out << indent <<
" '"
1211 if (
const edit_script& e = d.member_fn_tmpls_changes())
1214 int numdels = e.num_deletions();
1217 "member function template", indent);
1218 for (vector<deletion>::const_iterator i = e.deletions().begin();
1219 i != e.deletions().end();
1222 member_function_template_sptr mem_fn_tmpl =
1223 first->get_member_function_templates()[i->index()];
1224 out << indent <<
" '"
1225 << mem_fn_tmpl->as_function_tdecl()->get_pretty_representation()
1230 int numins = e.num_insertions();
1233 "member function template", indent);
1234 for (vector<insertion>::const_iterator i = e.insertions().begin();
1235 i != e.insertions().end();
1238 member_function_template_sptr mem_fn_tmpl;
1239 for (vector<unsigned>::const_iterator j =
1240 i->inserted_indexes().begin();
1241 j != i->inserted_indexes().end();
1244 mem_fn_tmpl = second->get_member_function_templates()[*j];
1245 out << indent <<
" '"
1246 << mem_fn_tmpl->as_function_tdecl()->
1254 if (
const edit_script& e = d.member_class_tmpls_changes())
1257 int numdels = e.num_deletions();
1260 "member class template", indent);
1261 for (vector<deletion>::const_iterator i = e.deletions().begin();
1262 i != e.deletions().end();
1265 member_class_template_sptr mem_cls_tmpl =
1266 first->get_member_class_templates()[i->index()];
1267 out << indent <<
" '"
1268 << mem_cls_tmpl->as_class_tdecl()->get_pretty_representation()
1273 int numins = e.num_insertions();
1276 "member class template", indent);
1277 for (vector<insertion>::const_iterator i = e.insertions().begin();
1278 i != e.insertions().end();
1281 member_class_template_sptr mem_cls_tmpl;
1282 for (vector<unsigned>::const_iterator j =
1283 i->inserted_indexes().begin();
1284 j != i->inserted_indexes().end();
1287 mem_cls_tmpl = second->get_member_class_templates()[*j];
1288 out << indent <<
" '"
1289 << mem_cls_tmpl->as_class_tdecl()
1290 ->get_pretty_representation()
1307 default_reporter::report(
const class_diff& d, ostream& out,
1308 const string& indent)
const
1310 if (!d.to_be_reported())
1313 string name = d.first_subject()->get_pretty_representation();
1315 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER(d.first_subject(),
1316 d.second_subject());
1318 d.currently_reporting(
true);
1322 second = d.second_class_decl();
1331 if (d.base_changes())
1334 int numdels = d.get_priv()->deleted_bases_.size();
1335 size_t numchanges = d.get_priv()->sorted_changed_bases_.size();
1340 "base class", indent);
1342 for (class_decl::base_specs::const_iterator i
1343 = d.get_priv()->sorted_deleted_bases_.begin();
1344 i != d.get_priv()->sorted_deleted_bases_.end();
1347 if (i != d.get_priv()->sorted_deleted_bases_.begin())
1352 if (d.get_priv()->base_has_changed(base))
1354 out << indent <<
" "
1355 << base->get_base_class()->get_pretty_representation();
1362 size_t num_filtered = d.get_priv()->count_filtered_bases();
1366 "base class", indent);
1367 for (base_diff_sptrs_type::const_iterator it =
1368 d.get_priv()->sorted_changed_bases_.begin();
1369 it != d.get_priv()->sorted_changed_bases_.end();
1373 if (!diff || !diff->to_be_reported())
1377 out << indent <<
" '"
1378 << o->get_base_class()->get_pretty_representation() <<
"'";
1380 out <<
" changed:\n";
1381 diff->report(out, indent +
" ");
1386 int numins = d.get_priv()->inserted_bases_.size();
1390 "base class", indent);
1392 for (class_decl::base_specs::const_iterator i =
1393 d.get_priv()->sorted_inserted_bases_.begin();
1394 i != d.get_priv()->sorted_inserted_bases_.end();
1398 out << indent <<
" " << b->get_pretty_representation();
1408 d.class_or_union_diff::report(out, indent);
1410 d.currently_reporting(
false);
1412 d.reported_once(
true);
1425 default_reporter::report(
const union_diff& d, ostream& out,
1426 const string& indent)
const
1428 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER(d.first_subject(),
1429 d.second_subject());
1431 d.currently_reporting(
true);
1434 union_decl_sptr first = d.first_union_decl(), second = d.second_union_decl();
1441 d.class_or_union_diff::report(out, indent);
1449 out << indent <<
"type changed from:\n"
1455 << indent <<
"to:\n"
1463 d.currently_reporting(
false);
1465 d.reported_once(
true);
1477 default_reporter::report(
const distinct_diff& d, ostream& out,
1478 const string& indent)
const
1480 if (!d.to_be_reported())
1485 string f_repr = f ? f->get_pretty_representation() :
"'void'";
1486 string s_repr = s ? s->get_pretty_representation() :
"'void'";
1488 diff_sptr diff = d.compatible_child_diff();
1490 string compatible = diff ?
" to compatible type '":
" to '";
1492 out << indent <<
"entity changed from '" << f_repr <<
"'"
1493 << compatible << s_repr <<
"'";
1501 diff->report(out, indent +
" ");
1515 default_reporter::report(
const function_decl_diff& d, ostream& out,
1516 const string& indent)
const
1518 if (!d.to_be_reported())
1522 d.second_function_decl(),
1523 d.context(), out, indent);
1529 corpus_sptr fc = ctxt->get_first_corpus();
1530 corpus_sptr sc = ctxt->get_second_corpus();
1533 string qn1 = ff->get_qualified_name(), qn2 = sf->get_qualified_name(),
1534 linkage_names1, linkage_names2;
1538 linkage_names1 = s1->get_id_string();
1540 linkage_names2 = s2->get_id_string();
1546 s1->get_aliases_id_string(fc->get_fun_symbol_map());
1549 s2->get_aliases_id_string(sc->get_fun_symbol_map());
1551 if (!d.is_filtered_out_without_looking_at_allowed_changes())
1555 if (linkage_names1 != linkage_names2)
1557 if (linkage_names1.empty())
1559 out << indent << ff->get_pretty_representation()
1560 <<
" didn't have any linkage name, and it now has: '"
1561 << linkage_names2 <<
"'\n";
1563 else if (linkage_names2.empty())
1565 out << indent << ff->get_pretty_representation()
1566 <<
" did have linkage names '" << linkage_names1
1568 << indent <<
"but it doesn't have any linkage name anymore\n";
1571 out << indent <<
"linkage names of "
1572 << ff->get_pretty_representation()
1573 <<
"\n" << indent <<
"changed from '"
1574 << linkage_names1 <<
"' to '" << linkage_names2 <<
"'\n";
1579 && d.type_diff()->to_be_reported())
1585 string frep1 = d.first_function_decl()->get_pretty_representation(),
1586 frep2 = d.second_function_decl()->get_pretty_representation();
1587 out << indent <<
"'" << frep1 <<
" {" << linkage_names1<<
"}"
1588 <<
"' now becomes '"
1589 << frep2 <<
" {" << linkage_names2 <<
"}" <<
"'\n";
1594 d.context(), out, indent);
1597 if (ff->is_declared_inline() != sf->is_declared_inline())
1600 if (ff->is_declared_inline())
1601 out << sf->get_pretty_representation()
1602 <<
" is not declared inline anymore\n";
1604 out << sf->get_pretty_representation()
1605 <<
" is now declared inline\n";
1613 if (ff_is_virtual != sf_is_virtual)
1617 out << ff->get_pretty_representation()
1618 <<
" is no more declared virtual\n";
1620 out << ff->get_pretty_representation()
1621 <<
" is now declared virtual\n";
1626 if (ff_is_virtual && sf_is_virtual
1627 && (ff_vtable_offset != sf_vtable_offset))
1630 <<
"the vtable offset of " << ff->get_pretty_representation()
1631 <<
" changed from " << ff_vtable_offset
1632 <<
" to " << sf_vtable_offset <<
"\n";
1637 class_or_union_sptr f =
1639 class_or_union_sptr s =
1647 bool vtable_added =
false, vtable_removed =
false;
1648 if (!f->get_is_declaration_only() && !s->get_is_declaration_only())
1652 vtable_added = !fc->has_vtable() && sc->has_vtable();
1653 vtable_removed = fc->has_vtable() && !sc->has_vtable();
1656 bool vtable_changed = ((ff_is_virtual != sf_is_virtual)
1657 || (ff_vtable_offset != sf_vtable_offset));
1658 bool incompatible_change = (ff_vtable_offset != sf_vtable_offset);
1662 <<
" note that a vtable was added to "
1663 << fc->get_pretty_representation()
1665 else if (vtable_removed)
1667 <<
" note that the vtable was removed from "
1668 << fc->get_pretty_representation()
1670 else if (vtable_changed)
1673 if (incompatible_change)
1674 out <<
" note that this is an ABI incompatible "
1675 "change to the vtable of ";
1677 out <<
" note that this induces a change to the vtable of ";
1678 out << fc->get_pretty_representation()
1686 if (d.type_diff() && d.type_diff()->to_be_reported())
1687 d.type_diff()->report(out, indent);
1700 default_reporter::report(
const var_diff& d, ostream& out,
1701 const string& indent)
const
1703 if (!d.to_be_reported())
1706 decl_base_sptr first = d.first_var(), second = d.second_var();
1707 string n = first->get_pretty_representation();
1709 if (!d.is_filtered_out_without_looking_at_allowed_changes())
1716 d.second_var()->get_symbol(),
1717 d.context(), out, indent);
1726 if (dif->to_be_reported())
1728 RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(dif,
"type");
1729 out << indent <<
"type of variable changed:\n";
1730 dif->report(out, indent +
" ");
1744 default_reporter::report(
const translation_unit_diff& d,
1746 const string& indent)
const
1748 static_cast<const scope_diff&
>(d).report(out, indent);
1760 default_reporter::report(
const corpus_diff& d, ostream& out,
1761 const string& indent)
const
1763 const corpus_diff::diff_stats &s =
1764 const_cast<corpus_diff&
>(d).
1765 apply_filters_and_suppressions_before_reporting();
1769 d.priv_->emit_diff_stats(s, out, indent);
1770 if (ctxt->show_stats_only())
1774 if (ctxt->show_soname_change()
1775 && !d.priv_->sonames_equal_)
1776 out << indent <<
"SONAME changed from '"
1777 << d.first_corpus()->get_soname() <<
"' to '"
1778 << d.second_corpus()->get_soname() <<
"'\n\n";
1780 if (ctxt->show_architecture_change()
1781 && !d.priv_->architectures_equal_)
1782 out << indent <<
"architecture changed from '"
1783 << d.first_corpus()->get_architecture_name() <<
"' to '"
1784 << d.second_corpus()->get_architecture_name() <<
"'\n\n";
1787 if (ctxt->show_deleted_fns())
1789 if (s.net_num_func_removed() == 1)
1790 out << indent <<
"1 Removed function:\n\n";
1791 else if (s.net_num_func_removed() > 1)
1792 out << indent << s.net_num_func_removed() <<
" Removed functions:\n\n";
1794 bool emitted =
false;
1795 vector<function_decl*>sorted_deleted_fns;
1797 for (vector<function_decl*>::const_iterator i =
1798 sorted_deleted_fns.begin();
1799 i != sorted_deleted_fns.end();
1802 if (d.priv_->deleted_function_is_suppressed(*i))
1808 out <<
"'" << (*i)->get_pretty_representation() <<
"'";
1809 if (ctxt->show_linkage_names())
1813 d.first_corpus()->get_fun_symbol_map());
1823 <<
"note that this removes an entry from the vtable of "
1824 << c->get_pretty_representation()
1833 if (ctxt->show_added_fns())
1835 if (s.net_num_func_added() == 1)
1836 out << indent <<
"1 Added function:\n\n";
1837 else if (s.net_num_func_added() > 1)
1838 out << indent << s.net_num_func_added()
1839 <<
" Added functions:\n\n";
1840 bool emitted =
false;
1841 vector<function_decl*> sorted_added_fns;
1843 for (vector<function_decl*>::const_iterator i = sorted_added_fns.begin();
1844 i != sorted_added_fns.end();
1847 if (d.priv_->added_function_is_suppressed(*i))
1855 << (*i)->get_pretty_representation()
1857 if (ctxt->show_linkage_names())
1861 (out,
"", *(*i)->get_symbol(),
1862 d.second_corpus()->get_fun_symbol_map());
1872 <<
"note that this adds a new entry to the vtable of "
1873 << c->get_pretty_representation()
1882 if (ctxt->show_changed_fns())
1884 size_t num_changed = s.num_func_changed() - s.num_changed_func_filtered_out();
1885 if (num_changed == 1)
1886 out << indent <<
"1 function with some indirect sub-type change:\n\n";
1887 else if (num_changed > 1)
1888 out << indent << num_changed
1889 <<
" functions with some indirect sub-type change:\n\n";
1891 vector<function_decl_diff_sptr> sorted_changed_fns;
1893 sorted_changed_fns);
1894 for (vector<function_decl_diff_sptr>::const_iterator i =
1895 sorted_changed_fns.begin();
1896 i != sorted_changed_fns.end();
1903 if (diff->to_be_reported())
1906 out << indent <<
" [C] '"
1907 << fn->get_pretty_representation() <<
"'";
1909 out <<
" has some indirect sub-type changes:\n";
1913 (fn->get_symbol()->has_aliases()
1925 && fn->get_name() != fn->get_symbol()->get_name()))
1931 int number_of_aliases =
1932 fn->get_symbol()->get_number_of_aliases();
1933 if (number_of_aliases == 0)
1935 out << indent <<
" "
1936 <<
"Please note that the exported symbol of "
1938 << fn->get_symbol()->get_id_string()
1943 out << indent <<
" "
1944 <<
"Please note that the symbol of this function is "
1945 << fn->get_symbol()->get_id_string()
1946 <<
"\n and it aliases symbol";
1947 if (number_of_aliases > 1)
1950 << fn->get_symbol()->get_aliases_id_string(
false)
1954 diff->report(out, indent +
" ");
1963 if (ctxt->show_deleted_vars())
1965 if (s.net_num_vars_removed() == 1)
1966 out << indent <<
"1 Removed variable:\n\n";
1967 else if (s.net_num_vars_removed() > 1)
1968 out << indent << s.net_num_vars_removed()
1969 <<
" Removed variables:\n\n";
1971 bool emitted =
false;
1972 vector<var_decl*> sorted_deleted_vars;
1974 for (vector<var_decl*>::const_iterator i =
1975 sorted_deleted_vars.begin();
1976 i != sorted_deleted_vars.end();
1979 if (d.priv_->deleted_variable_is_suppressed(*i))
1982 n = (*i)->get_pretty_representation();
1990 if (ctxt->show_linkage_names())
1994 d.first_corpus()->get_var_symbol_map());
2004 if (ctxt->show_added_vars())
2006 if (s.net_num_vars_added() == 1)
2007 out << indent <<
"1 Added variable:\n\n";
2008 else if (s.net_num_vars_added() > 1)
2009 out << indent << s.net_num_vars_added()
2010 <<
" Added variables:\n\n";
2012 bool emitted =
false;
2013 vector<var_decl*> sorted_added_vars;
2015 for (vector<var_decl*>::const_iterator i =
2016 sorted_added_vars.begin();
2017 i != sorted_added_vars.end();
2020 if (d.priv_->added_variable_is_suppressed(*i))
2023 n = (*i)->get_pretty_representation();
2028 out <<
"'" << n <<
"'";
2029 if (ctxt->show_linkage_names())
2033 d.second_corpus()->get_var_symbol_map());
2043 if (ctxt->show_changed_vars())
2045 size_t num_changed =
2046 s.num_vars_changed() - s.num_changed_vars_filtered_out();
2047 if (num_changed == 1)
2048 out << indent <<
"1 Changed variable:\n\n";
2049 else if (num_changed > 1)
2050 out << indent << num_changed
2051 <<
" Changed variables:\n\n";
2054 for (var_diff_sptrs_type::const_iterator i =
2055 d.priv_->sorted_changed_vars_.begin();
2056 i != d.priv_->sorted_changed_vars_.end();
2064 if (!diff->to_be_reported())
2067 n1 = diff->first_subject()->get_pretty_representation();
2068 n2 = diff->second_subject()->get_pretty_representation();
2070 out << indent <<
" [C] '" << n1 <<
"' was changed";
2072 out <<
" to '" << n2 <<
"'";
2075 diff->report(out, indent +
" ");
2083 if (ctxt->show_symbols_unreferenced_by_debug_info()
2084 && d.priv_->deleted_unrefed_fn_syms_.size())
2086 if (s.net_num_removed_func_syms() == 1)
2088 <<
"1 Removed function symbol not referenced by debug info:\n\n";
2089 else if (s.net_num_removed_func_syms() > 0)
2091 << s.net_num_removed_func_syms()
2092 <<
" Removed function symbols not referenced by debug info:\n\n";
2094 bool emitted =
false;
2095 vector<elf_symbol_sptr> sorted_deleted_unrefed_fn_syms;
2097 sorted_deleted_unrefed_fn_syms);
2098 for (vector<elf_symbol_sptr>::const_iterator i =
2099 sorted_deleted_unrefed_fn_syms.begin();
2100 i != sorted_deleted_unrefed_fn_syms.end();
2103 if (d.priv_->deleted_unrefed_fn_sym_is_suppressed((*i).get()))
2106 out << indent <<
" ";
2110 d.first_corpus()->get_fun_symbol_map());
2119 if (ctxt->show_symbols_unreferenced_by_debug_info()
2120 && ctxt->show_added_symbols_unreferenced_by_debug_info()
2121 && d.priv_->added_unrefed_fn_syms_.size())
2123 if (s.net_num_added_func_syms() == 1)
2125 <<
"1 Added function symbol not referenced by debug info:\n\n";
2126 else if (s.net_num_added_func_syms() > 0)
2128 << s.net_num_added_func_syms()
2129 <<
" Added function symbols not referenced by debug info:\n\n";
2131 bool emitted =
false;
2132 vector<elf_symbol_sptr> sorted_added_unrefed_fn_syms;
2134 sorted_added_unrefed_fn_syms);
2135 for (vector<elf_symbol_sptr>::const_iterator i =
2136 sorted_added_unrefed_fn_syms.begin();
2137 i != sorted_added_unrefed_fn_syms.end();
2140 if (d.priv_->added_unrefed_fn_sym_is_suppressed((*i).get()))
2143 out << indent <<
" ";
2147 d.second_corpus()->get_fun_symbol_map());
2156 if (ctxt->show_symbols_unreferenced_by_debug_info()
2157 && d.priv_->deleted_unrefed_var_syms_.size())
2159 if (s.net_num_removed_var_syms() == 1)
2161 <<
"1 Removed variable symbol not referenced by debug info:\n\n";
2162 else if (s.net_num_removed_var_syms() > 0)
2164 << s.net_num_removed_var_syms()
2165 <<
" Removed variable symbols not referenced by debug info:\n\n";
2167 bool emitted =
false;
2168 vector<elf_symbol_sptr> sorted_deleted_unrefed_var_syms;
2170 sorted_deleted_unrefed_var_syms);
2171 for (vector<elf_symbol_sptr>::const_iterator i =
2172 sorted_deleted_unrefed_var_syms.begin();
2173 i != sorted_deleted_unrefed_var_syms.end();
2176 if (d.priv_->deleted_unrefed_var_sym_is_suppressed((*i).get()))
2179 out << indent <<
" ";
2184 d.first_corpus()->get_fun_symbol_map());
2194 if (ctxt->show_symbols_unreferenced_by_debug_info()
2195 && ctxt->show_added_symbols_unreferenced_by_debug_info()
2196 && d.priv_->added_unrefed_var_syms_.size())
2198 if (s.net_num_added_var_syms() == 1)
2200 <<
"1 Added variable symbol not referenced by debug info:\n\n";
2201 else if (s.net_num_added_var_syms() > 0)
2203 << s.net_num_added_var_syms()
2204 <<
" Added variable symbols not referenced by debug info:\n\n";
2206 bool emitted =
false;
2207 vector<elf_symbol_sptr> sorted_added_unrefed_var_syms;
2209 sorted_added_unrefed_var_syms);
2210 for (vector<elf_symbol_sptr>::const_iterator i =
2211 sorted_added_unrefed_var_syms.begin();
2212 i != sorted_added_unrefed_var_syms.end();
2215 if (d.priv_->added_unrefed_var_sym_is_suppressed((*i).get()))
2218 out << indent <<
" ";
2221 d.second_corpus()->get_fun_symbol_map());
2233 d.priv_->maybe_dump_diff_tree();
Testing (anding) against this mask means that a given IR artifact has local differences, with respect to the other artifact it was compared against. A local change is a change that is carried by the artifact itself (or its type), rather than by one off its sub-types.
bool is_filtered_out_without_looking_at_allowed_changes() const
Test if this diff tree node is to be filtered out for reporting purposes, but without considering the...
size_t net_num_added_unreachable_types() const
Getter of the number of added types that are unreachable from public interfaces and that are *NOT* fi...
bool is_type(const type_or_decl_base &tod)
Test whether a declaration is a type.
bool get_member_function_is_virtual(const function_decl &f)
Test if a given member function is virtual.
void sort_enumerators(const string_enumerator_map &enumerators_map, enum_type_decl::enumerators &sorted)
Sort a map of enumerators by their value.
void report_local_reference_type_changes(const reference_diff &d, std::ostream &out, const std::string &indent) const
For a node, report the local changes carried by the diff node.
Abstraction of a diff between two qualified types.
size_t net_num_func_removed() const
Getter for the net number of function removed.
shared_ptr< class_diff > class_diff_sptr
Convenience typedef for a shared pointer on a class_diff type.
size_t net_num_vars_changed() const
Getter for the number of variables that have a change in their sub-types, minus the number of these v...
This means that a given IR artifact has changes in some of its sub-types, with respect to the other a...
bool type_has_sub_type_changes(const type_base_sptr t_v1, const type_base_sptr t_v2)
Tests if the change of a given type effectively comes from just its sub-types. That is...
size_t net_num_changed_unreachable_types() const
Getter of the number of changed types that are unreachable from public interfaces and that have *NOT*...
bool is_c_language(translation_unit::language l)
Test if a language enumerator designates the C language.
bool is_class_type(const type_or_decl_base &t)
Test whether a type is a class.
shared_ptr< function_type > function_type_sptr
Convenience typedef for a shared pointer on a function_type.
bool is_member_function(const function_decl &f)
Test whether a function_decl is a member function.
bool report_local_qualified_type_changes(const qualified_type_diff &d, std::ostream &out, const std::string &indent) const
For a qualified_type_diff node, report the changes that are local.
const qualified_type_def_sptr first_qualified_type() const
Getter for the first qualified type of the diff.
void report_mem_header(ostream &out, size_t number, size_t num_filtered, diff_kind k, const string §ion_name, const string &indent)
Output the header preceding the the report for insertion/deletion/change of a part of a class...
bool maybe_report_diff_for_variable(const decl_base_sptr &decl1, const decl_base_sptr &decl2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Report the differences between two generic variables.
void represent(const diff_context &ctxt, method_decl_sptr mem_fn, ostream &out)
Stream a string representation for a member function.
const array_type_def_sptr second_array() const
Getter for the second array of the diff.
void show_linkage_name_and_aliases(ostream &out, const string &indent, const elf_symbol &symbol, const string_elf_symbols_map_type &sym_map)
For a given symbol, emit a string made of its name and version. The string also contains the list of ...
This means that a diff node was marked as suppressed by a user-provided suppression specification...
const typedef_decl_sptr first_typedef_decl() const
Getter for the firt typedef_decl involved in the diff.
size_t net_num_vars_added() const
Getter for the net number of added variables.
shared_ptr< diff_context > diff_context_sptr
Convenience typedef for a shared pointer of diff_context.
Abstraction of a diff between two typedef_decl.
ssize_t get_member_function_vtable_offset(const function_decl &f)
Get the vtable offset of a member function.
void sort_data_members(const string_decl_base_sptr_map &data_members, vector< decl_base_sptr > &sorted)
Sort a map of data members by the offset of their initial value.
This means the diff node (or at least one of its descendant nodes) carries access related changes...
const type_decl_sptr first_type_decl() const
Getter for the first subject of the type_decl_diff.
virtual bool diff_to_be_reported(const diff *d) const
Tests if the diff node is to be reported.
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
string get_class_or_union_flat_representation(const class_or_union &cou, const string &indent, bool one_line, bool internal, bool qualified_names)
Get the flat representation of an instance of class_or_union type.
The abstraction of a diff between two arrays.
size_t net_num_added_func_syms() const
Getter of the net number of added function symbols that are not referenced by any debug info...
size_t net_num_func_added() const
Getter for the net number of added functions.
class_or_union * is_class_or_union_type(const type_or_decl_base *t)
Test if a type is a class_or_union.
shared_ptr< typedef_decl > typedef_decl_sptr
Convenience typedef for a shared pointer on a typedef_decl.
change_kind
A bitfield that gives callers of abigail::ir::equals() some insight about how different two internal ...
bool types_have_similar_structure(const type_base_sptr &first, const type_base_sptr &second, bool indirect_type)
Test if two types have similar structures, even though they are (or can be) different.
bool maybe_report_diff_for_member(const decl_base_sptr &decl1, const decl_base_sptr &decl2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Report the differences in access specifiers and static-ness for class members.
void report_local_function_type_changes(const function_type_diff &d, std::ostream &out, const std::string &indent) const
For a function_type_diff node, report the local changes carried by the diff node. ...
void sort_string_elf_symbol_map(const string_elf_symbol_map &map, vector< elf_symbol_sptr > &sorted)
Sort a map of string -> pointer to elf_symbol.
bool get_member_function_is_dtor(const function_decl &f)
Test whether a member function is a destructor.
Abstraction of a diff between two basic type declarations.
void sort_string_var_ptr_map(const string_var_ptr_map &map, vector< var_decl * > &sorted)
Sort a map of string -> pointer to var_decl.
bool soname_changed() const
Test if the soname of the underlying corpus has changed.
void report_underlying_changes_of_qualified_type(const qualified_type_diff &d, ostream &out, const string &indent) const
For a qualified_type_diff node, report the changes of its underlying type.
size_t net_num_removed_func_syms() const
Getter of the net number of removed function symbols that are not referenced by any debug info...
std::vector< enumerator > enumerators
Convenience typedef for a list of enumerator.
The abstraction of the diff between two subrange types.
An abstraction of a diff between between two abi corpus.
vector< changed_enumerator > changed_enumerators_type
Convenience typedef for a vector of changed enumerators.
void maybe_report_interfaces_impacted_by_diff(const diff *d, ostream &out, const string &indent)
If a given diff node impacts some public interfaces, then report about those impacted interfaces on a...
diff_category
An enum for the different categories that a diff tree node falls into, regarding the kind of changes ...
Toplevel namespace for libabigail.
bool has_harmless_name_change(const decl_base_sptr &f, const decl_base_sptr &s)
Test if two decls represents a harmless name change.
shared_ptr< function_decl > function_decl_sptr
Convenience typedef for a shared pointer on a function_decl.
bool reported_once() const
Tests if a report has already been emitted for the current diff.
void report_name_size_and_alignment_changes(decl_base_sptr first, decl_base_sptr second, diff_context_sptr ctxt, ostream &out, const string &indent)
Report the name, size and alignment changes of a type.
The declaration of the reporting types of libabigail's diff engine.
shared_ptr< parameter > parameter_sptr
Convenience typedef for a shared pointer on a function_decl::parameter.
size_t net_num_vars_removed() const
Getter for the net number of removed variables.
shared_ptr< base_spec > base_spec_sptr
Convenience typedef.
This means that a diff node was warked as being for a private type. That is, the diff node is meant t...
This means that a diff node in the sub-tree carries a harmless union change.
This means that a diff node in the sub-tree carries a harmless declaration name change. This is set only for name changes for data members and typedefs.
const array_type_def::subrange_sptr first_subrange() const
Getter of the first subrange of the current instance subrange_diff.
bool has_class_decl_only_def_change(const class_or_union_sptr &first, const class_or_union_sptr &second)
Test if two class_or_union_sptr are different just by the fact that one is decl-only and the other on...
diff_sptr leaf_underlying_type_diff() const
Getter for the diff between the most underlying non-qualified types of two qualified types...
size_t net_num_removed_var_syms() const
Getter of the net number of removed variable symbols that are not referenced by any debug info...
A diff node in this category is redundant. That means it's present as a child of a other nodes in the...
The abstraction of a diff between two references.
const decl_base * get_type_declaration(const type_base *t)
Get the declaration for a given type.
This means that a diff node in the sub-tree carries a type that was declaration-only and that is now ...
shared_ptr< type_or_decl_base > type_or_decl_base_sptr
A convenience typedef for a shared_ptr to type_or_decl_base.
shared_ptr< type_decl > type_decl_sptr
Convenience typedef for a shared pointer on a type_decl.
The abstraction of a diff between two pointers.
translation_unit * get_translation_unit(const decl_base &decl)
Return the translation unit a declaration belongs to.
size_t net_num_added_var_syms() const
Getter of the net number of added variable symbols that are not referenced by any debug info...
bool report_loc_info(const type_or_decl_base_sptr &tod, const diff_context &ctxt, ostream &out)
shared_ptr< reference_type_def > reference_type_def_sptr
Convenience typedef for a shared pointer on a reference_type_def.
shared_ptr< elf_symbol > elf_symbol_sptr
A convenience typedef for a shared pointer to elf_symbol.
void maybe_report_data_members_replaced_by_anon_dm(const class_or_union_diff &d, ostream &out, const string &indent)
Report about data members replaced by an anonymous data member without changing the overall bit-layou...
#define ABG_ASSERT(cond)
This is a wrapper around the 'assert' glibc call. It allows for its argument to have side effects...
virtual bool diff_has_net_changes(const corpus_diff *d) const
Test if a given instance of corpus_diff carries changes whose reports are not suppressed by any suppr...
bool union_diff_has_harmless_changes(const diff *d)
Test if a union diff node does have changes that don't impact its size.
void report_size_and_alignment_changes(type_or_decl_base_sptr first, type_or_decl_base_sptr second, diff_context_sptr ctxt, ostream &out, const string &indent)
Report the size and alignment changes of a type.
type_base_sptr strip_typedef(const type_base_sptr type)
Recursively returns the the underlying type of a typedef. The return type should not be a typedef of ...
diff_sptr underlying_type_diff() const
Getter for the diff between the pointed-to types of the pointers of this diff.
size_t net_num_func_changed() const
Getter for the number of functions that have a change in their sub-types, minus the number of these f...
const diff_sptr & element_type_diff() const
Getter for the diff between the two types of array elements.
const type_decl_sptr second_type_decl() const
Getter for the second subject of the type_decl_diff.
const array_type_def::subrange_sptr second_subrange() const
Getter of the second subrange of the current instance subrange_diff.
bool get_member_function_is_ctor(const function_decl &f)
Test whether a member function is a constructor.
const function_type_sptr second_function_type() const
Getter for the second subject of the diff.
shared_ptr< enum_type_decl > enum_type_decl_sptr
Convenience typedef for shared pointer to a enum_type_decl.
shared_ptr< base_diff > base_diff_sptr
Convenience typedef for a shared pointer to a base_diff type.
void sort_changed_enumerators(const string_changed_enumerator_map &enumerators_map, changed_enumerators_type &sorted)
Sort a map of changed enumerators.
shared_ptr< class_decl > class_decl_sptr
Convenience typedef for a shared pointer on a class_decl.
bool to_be_reported() const
Test if this diff tree node should be reported.
const function_type_sptr first_function_type() const
Getter for the first subject of the diff.
const typedef_decl_sptr second_typedef_decl() const
Getter for the second typedef_decl involved in the diff.
bool get_member_is_static(const decl_base &d)
Gets a flag saying if a class member is static or not.
This means that a diff node in the sub-tree carries an addition or removal of a non-virtual member fu...
reference_type_def_sptr second_reference() const
Getter for the second reference of the diff.
The private data and functions of the abigail::ir::comparison types.
void report_non_type_typedef_changes(const typedef_diff &d, std::ostream &out, const std::string &indent) const
For a typedef_diff node, report the local changes to the typedef rather the changes to its underlying...
void sort_string_function_decl_diff_sptr_map(const string_function_decl_diff_sptr_map &map, function_decl_diff_sptrs_type &sorted)
Sort the values of a string_function_decl_diff_sptr_map map and store the result in a vector of funct...
size_t net_num_removed_unreachable_types() const
Getter of the number of removed types that are not reachable from public interfaces and that have *NO...
const qualified_type_def_sptr second_qualified_type() const
Getter for the second qualified type of the diff.
reference_type_def_sptr first_reference() const
Getter for the first reference of the diff.
void represent_data_member(var_decl_sptr d, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Stream a string representation for a data member.
string get_pretty_representation(const type_or_decl_base *tod, bool internal)
Build and return a copy of the pretty representation of an ABI artifact that could be either a type o...
const diff_sptr & underlying_type_diff() const
Getter for the diff between the two referred-to types.
bool equals(const decl_base &l, const decl_base &r, change_kind *k)
Compares two instances of decl_base.
void maybe_report_diff_for_symbol(const elf_symbol_sptr &symbol1, const elf_symbol_sptr &symbol2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Report the difference between two ELF symbols, if there is any.
void maybe_report_unreachable_type_changes(const corpus_diff &d, const corpus_diff::diff_stats &s, const string &indent, ostream &out)
Report changes about types that are not reachable from global functions and variables, in a given.
const diff_sptr underlying_type_diff() const
Getter for the diff between the two underlying types of the typedefs.
This is a document class that aims to capture statistics about the changes carried by a corpus_diff t...
void maybe_report_base_class_reordering(const class_diff &d, ostream &out, const string &indent)
Report about the base classes of a class having been re-ordered.
shared_ptr< diff > diff_sptr
Convenience typedef for a shared_ptr for the diff class.
bool has_enum_decl_only_def_change(const enum_type_decl_sptr &first, const enum_type_decl_sptr &second)
Test if two enum_sptr are different just by the fact that one is decl-only and the other one is defin...
bool architecture_changed() const
Test if the architecture of the underlying corpus has changed.
method_type_sptr is_method_type(const type_or_decl_base_sptr &t)
Test whether a type is a method_type.
Abstraction of a diff between two function types.
string get_pretty_representation(diff *d)
Get a copy of the pretty representation of a diff node.
const array_type_def_sptr first_array() const
Getter for the first array of the diff.
const diff_context_sptr context() const
Getter of the context of the current diff.
void sort_string_function_ptr_map(const string_function_ptr_map &map, vector< function_decl * > &sorted)
Sort an instance of string_function_ptr_map map and stuff a resulting sorted vector of pointers to fu...