15#include "abg-internal.h"
20ABG_BEGIN_EXPORT_DECLARATIONS
24#include "abg-suppression.h"
29ABG_END_EXPORT_DECLARATIONS
41using namespace comparison;
43using std::dynamic_pointer_cast;
48OFFSET_OF_FLEXIBLE_ARRAY_DATA_MEMBER_STRING()
50 static string s =
"offset_of_flexible_array_data_member";
58 static string s =
"end";
77 for (
const char *
const * name = names; name < names + count; ++name)
92suppression_base::suppression_base(
const string& label)
93 : priv_(new
priv(label))
106suppression_base::suppression_base(
const string& label,
107 const string& file_name_regex_str,
108 const string& file_name_not_regex_str)
109 : priv_(new
priv(label,
111 file_name_not_regex_str))
122{
return priv_->drops_artifact_.load();}
133{priv_->drops_artifact_ = f;}
144{
return priv_->is_artificial_.load();}
154{priv_->is_artificial_ = f;}
162 lock_guard<mutex> lock(priv_->mutex_);
163 return priv_->label_;
172 lock_guard<mutex> lock(priv_->mutex_);
173 priv_->label_ = label;
187 lock_guard<mutex> lock(priv_->mutex_);
188 priv_->file_name_regex_str_ = regexp;
202 lock_guard<mutex> lock(priv_->mutex_);
203 return priv_->file_name_regex_str_;
218 lock_guard<mutex> lock(priv_->mutex_);
219 priv_->file_name_not_regex_str_ = regexp;
234 lock_guard<mutex> lock(priv_->mutex_);
235 return priv_->file_name_not_regex_str_;
261 lock_guard<mutex> lock(priv_->mutex_);
262 priv_->soname_regex_str_ = regexp;
276 lock_guard<mutex> lock(priv_->mutex_);
277 return priv_->soname_regex_str_;
291{priv_->soname_not_regex_str_ = regexp;}
305 lock_guard<mutex> lock(priv_->mutex_);
306 return priv_->soname_not_regex_str_;
379 result = dynamic_pointer_cast<negated_suppression_base>(s);
400 string first_soname = ctxt.
get_corpus_diff()->first_corpus()->get_soname(),
406 if (!suppr.priv_->matches_soname(first_soname)
407 && !suppr.priv_->matches_soname(second_soname))
426names_of_binaries_match(
const suppression_base& suppr,
427 const diff_context &ctxt)
430 string first_binary_path = ctxt.get_corpus_diff()->first_corpus()->get_path(),
431 second_binary_path = ctxt.get_corpus_diff()->second_corpus()->get_path();
433 if (!suppr.has_file_name_related_property())
436 if (!suppr.priv_->matches_binary_name(first_binary_path)
437 && !suppr.priv_->matches_binary_name(second_binary_path))
443suppression_base::~suppression_base()
447read_type_suppression(
const ini::config::section& section);
450read_function_suppression(
const ini::config::section& section);
453read_variable_suppression(
const ini::config::section& section);
456read_file_suppression(
const ini::config::section& section);
469read_suppressions(
const ini::config& config,
473 for (ini::config::sections_type::const_iterator i =
474 config.get_sections().begin();
475 i != config.get_sections().end();
477 if ((s = read_type_suppression(**i))
478 || (s = read_function_suppression(**i))
479 || (s = read_variable_suppression(**i))
480 || (s = read_file_suppression(**i)))
481 suppressions.push_back(s);
492read_suppressions(std::istream& input,
496 read_suppressions(*
config, suppressions);
506read_suppressions(
const string& file_path,
510 read_suppressions(*
config, suppressions);
532type_suppression::type_suppression(
const string& label,
533 const string& type_name_regexp,
534 const string& type_name)
536 priv_(new
priv(type_name_regexp,
544type_suppression::~type_suppression()
557 lock_guard<mutex> lock(priv_->mutex_);
558 priv_->type_name_regex_str_ = name_regex_str;
571 lock_guard<mutex> lock(priv_->mutex_);
572 return priv_->type_name_regex_str_;
584{priv_->set_type_name_not_regex_str(r);}
595{
return priv_->get_type_name_not_regex_str();}
604 lock_guard<mutex> lock(priv_->mutex_);
605 priv_->type_name_ = name;
615 lock_guard<mutex> lock(priv_->mutex_);
616 return priv_->type_name_;
625{
return priv_->consider_type_kind_.load();}
633{priv_->consider_type_kind_ = f;}
644{priv_->type_kind_ = k;}
655{
return priv_->type_kind_;}
664{
return priv_->consider_reach_kind_.load();}
674{priv_->consider_reach_kind_ = f;}
683{
return priv_->reach_kind_.load();}
692{priv_->reach_kind_ = k;}
699{
return priv_->has_size_change_.load();}
706{priv_->has_size_change_ = flag;}
712const unordered_set<string>&
715 lock_guard<mutex> lock(priv_->mutex_);
716 return priv_->potential_data_members_;
725(
const string_set_type& s)
const
727 lock_guard<mutex> lock(priv_->mutex_);
728 priv_->potential_data_members_ = s;
736{
return priv_->potential_data_members_regex_str_;}
743(
const string& d)
const
745 lock_guard<mutex> lock(priv_->mutex_);
746 priv_->potential_data_members_regex_str_ = d;
757 lock_guard<mutex> lock(priv_->mutex_);
758 priv_->insertion_ranges_ = r;
769 return priv_->insertion_ranges_;
780 return priv_->insertion_ranges_;
788const unordered_set<string>&
791 return priv_->source_locations_to_keep_;
799unordered_set<string>&
801{
return priv_->source_locations_to_keep_;}
809(
const unordered_set<string>& l)
811 lock_guard<mutex> lock(priv_->mutex_);
812 priv_->source_locations_to_keep_ = l;
821{
return priv_->source_location_to_keep_regex_str_;}
830 lock_guard<mutex> lock(priv_->mutex_);
831 priv_->source_location_to_keep_regex_str_ = r;
842{
return priv_->changed_enumerator_names_;}
853 lock_guard<mutex> lock(priv_->mutex_);
854 priv_->changed_enumerator_names_ = n;
864const vector<regex::regex_t_sptr>&
866{
return priv_->changed_enumerators_regexp_;}
878 lock_guard<mutex> lock(priv_->mutex_);
879 priv_->changed_enumerators_regexp_ = n;
887{
return priv_->has_strict_fam_conv_.load();}
895{priv_->has_strict_fam_conv_ = f;}
925 if (comparison::filtering::has_virtual_mem_fn_change(d))
937 type_base_sptr ft, st;
964 d =
is_type_diff(ptr_diff->underlying_type_diff().get());
977 d =
is_type_diff(ref_diff->underlying_type_diff().get());
990 d =
is_type_diff(ptr_diff->underlying_type_diff().get());
996 d =
is_type_diff(ref_diff->underlying_type_diff().get());
1005 type_base_sptr ft, st;
1046 if (!f->find_data_member(var_name))
1052 if (
const regex_t_sptr& data_member_name_regex =
1053 priv_->get_potential_data_member_names_regex())
1055 bool data_member_matched =
false;
1058 if (
regex::match(data_member_name_regex, dm->get_name()))
1060 data_member_matched =
true;
1064 if (!data_member_matched)
1104 decl_base_sptr member = m.second;
1105 bool matched =
false;
1122 bool matched =
false;
1146 == second_class->get_size_in_bits())))
1158 && (enum_dif->
first_enum()->get_size_in_bits()
1169 bool matched =
true;
1170 for (string_changed_enumerator_map::const_iterator i =
1182 [&] (
const regex_t_sptr& enum_regexp)
1214 if (!names_of_binaries_match(*
this, *ctxt))
1219 if (!sonames_of_binaries_match(*
this, *ctxt))
1240 const type_base_sptr &type)
1247 bool matches =
true;
1250 case type_suppression::UNKNOWN_TYPE_KIND:
1251 case type_suppression::CLASS_TYPE_KIND:
1255 case type_suppression::STRUCT_TYPE_KIND:
1258 if (!klass || !klass->is_struct())
1262 case type_suppression::UNION_TYPE_KIND:
1266 case type_suppression::ENUM_TYPE_KIND:
1270 case type_suppression::ARRAY_TYPE_KIND:
1274 case type_suppression::TYPEDEF_TYPE_KIND:
1278 case type_suppression::BUILTIN_TYPE_KIND:
1305 const string& type_name)
1308 || s.priv_->get_type_name_regex()
1309 || s.priv_->get_type_name_not_regex())
1324 if (
const regex_t_sptr& type_name_regex =
1325 s.priv_->get_type_name_regex())
1331 if (
const regex_t_sptr type_name_not_regex =
1332 s.priv_->get_type_name_not_regex())
1356 const type_base_sptr& type)
1376 string loc_path, loc_path_base;
1377 unsigned loc_line = 0, loc_column = 0;
1378 loc.
expand(loc_path, loc_line, loc_column);
1380 if (regex_t_sptr regexp = s.priv_->get_source_location_to_keep_regex())
1395 || s.priv_->get_source_location_to_keep_regex())
1415 const type_base_sptr& type)
1433 if (cl->get_is_declaration_only())
1437 ABG_ASSERT(!cl->get_definition_of_declaration());
1446 || s.priv_->get_source_location_to_keep_regex())
1469 const string& type_name,
1489 if (!suppression_matches_type_no_name(*
this, type))
1511 if (!suppression_matches_type_no_name(*
this, type))
1521struct type_suppression::insertion_range::priv
1550 : priv_(new priv(begin, end))
1560{
return priv_->begin_;}
1569{
return priv_->end_;}
1658 value = b->as_integer();
1665 && (fn_call->get_name() ==
"offset_of"
1666 || fn_call->get_name() ==
"offset_after"
1667 || fn_call->get_name() ==
"offset_of_first_data_member_regexp"
1668 || fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1669 && fn_call->get_arguments().size() == 1)
1671 if (fn_call->get_name() ==
"offset_of"
1672 || fn_call->get_name() ==
"offset_after")
1674 string member_name = fn_call->get_arguments()[0];
1675 for (class_decl::data_members::const_iterator it =
1682 if ((*it)->get_name() == member_name)
1684 if (fn_call->get_name() ==
"offset_of")
1686 else if (fn_call->get_name() ==
"offset_after")
1691 (*it)->get_type()->get_size_in_bits();
1701 else if (fn_call->get_name() ==
"offset_of_first_data_member_regexp"
1702 || fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1704 string name_regexp = fn_call->get_arguments()[0];
1708 if (fn_call->get_name() ==
"offset_of_first_data_member_regexp")
1710 else if (fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1723 if (b->get_name() == OFFSET_OF_FLEXIBLE_ARRAY_DATA_MEMBER_STRING())
1733 else if (b->get_name() == END_STRING())
1738 value = std::numeric_limits<uint64_t>::max();
1755 return value == std::numeric_limits<uint64_t>::max();
1768{
return dynamic_pointer_cast<type_suppression::insertion_range::integer_boundary>(b);}
1782{
return dynamic_pointer_cast<type_suppression::insertion_range::fn_call_expr_boundary>(b);}
1794{
return dynamic_pointer_cast<type_suppression::insertion_range::named_boundary>(b);}
1798struct type_suppression::insertion_range::boundary::priv
1816struct type_suppression::insertion_range::integer_boundary::priv
1824 priv(uint64_t value)
1833type_suppression::insertion_range::integer_boundary::integer_boundary(uint64_t value)
1834 : priv_(new priv(value))
1843{
return priv_->value_;}
1848type_suppression::insertion_range::integer_boundary::operator uint64_t()
const
1849{
return as_integer();}
1857struct type_suppression::insertion_range::fn_call_expr_boundary::priv
1874type_suppression::insertion_range::fn_call_expr_boundary::
1876 : priv_(new priv(expr))
1884{
return priv_->expr_;}
1890{
return as_function_call_expr();}
1899struct type_suppression::insertion_range::named_boundary::priv
1906 priv(
const string& name)
1915type_suppression::insertion_range::named_boundary::named_boundary(
const string& name)
1916 : priv_(new priv(name))
1924{
return priv_->name_;}
1936{
return dynamic_pointer_cast<type_suppression>(suppr);}
1959 const string& type_name_regexp,
1960 const string& type_name)
1994read_type_kind_string(
const string& input)
1996 if (input ==
"class")
1997 return type_suppression::CLASS_TYPE_KIND;
1998 else if (input ==
"struct")
1999 return type_suppression::STRUCT_TYPE_KIND;
2000 else if (input ==
"union")
2001 return type_suppression::UNION_TYPE_KIND;
2002 else if (input ==
"enum")
2003 return type_suppression::ENUM_TYPE_KIND;
2004 else if (input ==
"array")
2005 return type_suppression::ARRAY_TYPE_KIND;
2006 else if (input ==
"typedef")
2007 return type_suppression::TYPEDEF_TYPE_KIND;
2008 else if (input ==
"builtin")
2009 return type_suppression::BUILTIN_TYPE_KIND;
2011 return type_suppression::UNKNOWN_TYPE_KIND;
2022read_suppression_reach_kind(
const string& input)
2024 if (input ==
"direct")
2026 else if (input ==
"pointer")
2028 else if (input ==
"reference")
2030 else if (input ==
"reference-or-pointer")
2044read_type_suppression(
const ini::config::section& section)
2048 if (section.get_name() !=
"suppress_type"
2049 && section.get_name() !=
"allow_type")
2052 static const char *
const sufficient_props[] = {
2054 "file_name_not_regexp",
2056 "soname_not_regexp",
2061 "source_location_not_in",
2062 "source_location_not_regexp",
2065 sizeof(sufficient_props)/
sizeof(
char*),
2074 string drop_artifact_str = drop_artifact
2075 ? drop_artifact->get_value()->as_string()
2081 string has_size_change_str = has_size_change
2082 ? has_size_change->get_value()->as_string()
2087 string label_str = label ? label->get_value()->as_string() :
"";
2091 string file_name_regex_str =
2092 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
2096 string file_name_not_regex_str =
2097 file_name_not_regex_prop
2098 ? file_name_not_regex_prop->get_value()->as_string()
2103 string soname_regex_str =
2104 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
2108 string soname_not_regex_str =
2109 soname_not_regex_prop
2110 ? soname_not_regex_prop->get_value()->as_string()
2115 string name_regex_str = name_regex_prop
2116 ? name_regex_prop->get_value()->as_string()
2121 string name_not_regex_str = name_not_regex_prop
2122 ? name_not_regex_prop->get_value()->as_string()
2127 string name_str = name_prop
2128 ? name_prop->get_value()->as_string()
2132 section.find_property(
"source_location_not_in");
2133 unordered_set<string> srcloc_not_in;
2134 if (srcloc_not_in_prop)
2137 srcloc_not_in.insert(p->get_value()->as_string());
2144 vector<string>::const_iterator i;
2145 for (i = list_property->get_value()->get_content().begin();
2146 i != list_property->get_value()->get_content().end();
2148 srcloc_not_in.insert(*i);
2155 string srcloc_not_regexp_str;
2156 if (srcloc_not_regexp_prop)
2157 srcloc_not_regexp_str = srcloc_not_regexp_prop->get_value()->as_string();
2159 bool consider_type_kind =
false;
2164 consider_type_kind =
true;
2166 read_type_kind_string(type_kind_prop->get_value()->as_string());
2169 bool consider_reach_kind =
false;
2174 consider_reach_kind =
true;
2176 read_suppression_reach_kind(reach_kind_prop->get_value()->as_string());
2180 string_set_type potential_data_member_names;
2189 tv = prop->get_value();
2192 sv = prop->get_value();
2197 && tv->get_value_items().size() == 1
2210 potential_data_member_names.insert(name);
2213 for (
const string& name : val->get_content())
2214 potential_data_member_names.insert(name);
2218 string name = sv->as_string();
2219 potential_data_member_names.insert(name);
2224 string potential_data_member_names_regexp_str;
2227 potential_data_member_names_regexp_str = prop->get_value()->as_string();
2230 vector<type_suppression::insertion_range_sptr> insert_ranges;
2231 bool consider_data_member_insertion =
false;
2237 string ins_point = prop->get_value()->as_string();
2239 if (ins_point == END_STRING())
2241 else if (ins_point == OFFSET_OF_FLEXIBLE_ARRAY_DATA_MEMBER_STRING())
2243 else if (isdigit(ins_point[0]))
2245 (atoi(ins_point.c_str()));
2254 (
new type_suppression::insertion_range(begin, end));
2255 insert_ranges.push_back(insert_range);
2256 consider_data_member_insertion =
true;
2262 (
"has_data_member_inserted_between")))
2275 && v->get_value_items().size() == 1
2282 string str = val->get_content()[0];
2286 else if (isdigit(str[0]))
2288 (atoi(str.c_str()));
2295 str = val->get_content()[1];
2299 else if (isdigit(str[0]))
2301 (atoi(str.c_str()));
2309 (
new type_suppression::insertion_range(begin, end));
2310 insert_ranges.push_back(insert_range);
2311 consider_data_member_insertion =
true;
2330 (
"has_data_members_inserted_between")))
2332 bool is_well_formed =
true;
2333 for (vector<ini::property_value_sptr>::const_iterator i =
2334 prop->get_value()->get_value_items().begin();
2335 is_well_formed && i != prop->get_value()->get_value_items().end();
2341 || tuple_value->get_value_items().size() != 1
2344 is_well_formed =
false;
2349 if (list_value->get_content().size() != 2)
2351 is_well_formed =
false;
2356 string str = list_value->get_content()[0];
2360 else if (isdigit(str[0]))
2363 (atoi(str.c_str()));
2370 str = list_value->get_content()[1];
2374 else if (isdigit(str[0]))
2376 (atoi(str.c_str()));
2384 (
new type_suppression::insertion_range(begin, end));
2385 insert_ranges.push_back(insert_range);
2386 consider_data_member_insertion =
true;
2388 if (!is_well_formed)
2402 section.find_property(
"changed_enumerators");
2404 vector<string> changed_enumerator_names;
2405 if (changed_enumerators_prop)
2409 changed_enumerator_names =
2410 p->get_value()->get_content();
2413 changed_enumerator_names.push_back(p->get_value()->as_string());
2424 section.find_property(
"changed_enumerators_regexp");
2426 vector<regex_t_sptr> changed_enumerators_regexp;
2427 if (changed_enumerators_regexp_prop)
2432 for (
string e : p->get_value()->get_content())
2433 changed_enumerators_regexp.push_back(regex::
compile(e));
2438 changed_enumerators_regexp.push_back(
2447 (section.find_property(
"has_strict_flexible_array_data_member_conversion"));
2448 string has_strict_fam_conv_str = has_strict_fam_conv
2449 ? has_strict_fam_conv->get_value()->as_string()
2452 if (section.get_name() ==
"suppress_type")
2453 result.reset(
new type_suppression(label_str, name_regex_str, name_str));
2454 else if (section.get_name() ==
"allow_type")
2455 result.reset(
new negated_type_suppression(label_str, name_regex_str,
2458 if (consider_type_kind)
2460 result->set_consider_type_kind(
true);
2461 result->set_type_kind(type_kind);
2464 if (consider_reach_kind)
2466 result->set_consider_reach_kind(
true);
2467 result->set_reach_kind(reach_kind);
2470 if (!potential_data_member_names.empty())
2471 result->set_potential_data_member_names(potential_data_member_names);
2473 if (!potential_data_member_names_regexp_str.empty())
2474 result->set_potential_data_member_names_regex_str
2475 (potential_data_member_names_regexp_str);
2477 if (consider_data_member_insertion)
2478 result->set_data_member_insertion_ranges(insert_ranges);
2480 if (!name_not_regex_str.empty())
2481 result->set_type_name_not_regex_str(name_not_regex_str);
2483 if (!file_name_regex_str.empty())
2484 result->set_file_name_regex_str(file_name_regex_str);
2486 if (!file_name_not_regex_str.empty())
2487 result->set_file_name_not_regex_str(file_name_not_regex_str);
2489 if (!soname_regex_str.empty())
2490 result->set_soname_regex_str(soname_regex_str);
2492 if (!soname_not_regex_str.empty())
2493 result->set_soname_not_regex_str(soname_not_regex_str);
2495 if (!srcloc_not_in.empty())
2496 result->set_source_locations_to_keep(srcloc_not_in);
2498 if (!srcloc_not_regexp_str.empty())
2499 result->set_source_location_to_keep_regex_str(srcloc_not_regexp_str);
2501 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
2502 && ((!name_regex_str.empty()
2503 || !name_str.empty()
2504 || !srcloc_not_regexp_str.empty()
2505 || !srcloc_not_in.empty())))
2506 result->set_drops_artifact_from_ir(
true);
2508 if (has_size_change_str ==
"yes" || has_size_change_str ==
"true")
2509 result->set_has_size_change(
true);
2511 if (result->get_type_kind() == type_suppression::ENUM_TYPE_KIND
2512 && !changed_enumerator_names.empty())
2513 result->set_changed_enumerator_names(changed_enumerator_names);
2515 if (result->get_type_kind() == type_suppression::ENUM_TYPE_KIND
2516 && !changed_enumerators_regexp.empty())
2517 result->set_changed_enumerators_regexp(changed_enumerators_regexp);
2519 if (has_strict_fam_conv_str ==
"yes" || has_strict_fam_conv_str ==
"true")
2520 result->set_has_strict_fam_conversion(
true);
2538function_suppression::parameter_spec::parameter_spec(
size_t i,
2540 const string& tn_regex)
2541 : priv_(new
priv(i, tn, tn_regex))
2551{
return priv_->index_;}
2566{
return priv_->type_name_;}
2574{priv_->type_name_ = tn;}
2587{
return priv_->type_name_regex_str_;}
2601(
const string& type_name_regex_str)
2602{priv_->type_name_regex_str_ = type_name_regex_str;}
2671 const string& ret_tn,
2672 const string& ret_tr,
2674 const string& sym_n,
2675 const string& sym_nr,
2676 const string& sym_v,
2677 const string& sym_vr)
2679 priv_(new
priv(name, nr, ret_tn, ret_tr, ps,
2680 sym_n, sym_nr, sym_v, sym_vr))
2683function_suppression::~function_suppression()
2696 if (s ==
"function-subtype-change")
2698 else if (s ==
"added-function")
2700 else if (s ==
"deleted-function")
2702 else if (s ==
"all")
2705 return UNDEFINED_CHANGE_KIND;
2713{
return priv_->change_kind_;}
2720{priv_->change_kind_ = k;}
2729{
return priv_->name_;}
2747{
return priv_->name_regex_str_;}
2756{priv_->name_regex_str_ = r;}
2766{
return priv_->name_not_regex_str_;}
2776{priv_->name_not_regex_str_ = r;}
2785{
return priv_->return_type_name_;}
2794{priv_->return_type_name_ = tr;}
2810{
return priv_->return_type_regex_str_;}
2826{priv_->return_type_regex_str_ = r;}
2838{
return priv_->parm_specs_;}
2851{priv_->parm_specs_ = p;}
2858{priv_->parm_specs_.push_back(p);}
2869{
return priv_->symbol_name_;}
2880{priv_->symbol_name_ = n;}
2896{
return priv_->symbol_name_regex_str_;}
2912{priv_->symbol_name_regex_str_ = r;}
2931{
return priv_->symbol_name_not_regex_str_;}
2951{priv_->symbol_name_not_regex_str_ = r;}
2962{
return priv_->symbol_version_;}
2973{priv_->symbol_version_ = v;}
2988{
return priv_->symbol_version_regex_str_;}
3003{priv_->symbol_version_regex_str_ = r;}
3011{
return priv_->allow_other_aliases_;}
3019{priv_->allow_other_aliases_ = f;}
3073 if (!names_of_binaries_match(*
this, *ctxt))
3078 if (!sonames_of_binaries_match(*
this, *ctxt))
3093 && fn->
get_symbol()->get_alias_from_name(fname))
3103 symbol_name = sym->get_name();
3104 if (sym->has_aliases() && sym->get_alias_from_name(fname))
3107 a && !a->is_main_symbol();
3108 a = a->get_next_alias())
3109 if (a->get_name() != symbol_name)
3119 const regex_t_sptr name_regex = priv_->get_name_regex();
3127 && fn->
get_symbol()->get_alias_from_name(fname))
3137 symbol_name = sym->get_name();
3138 if (sym->has_aliases())
3141 a && !a->is_main_symbol();
3142 a = a->get_next_alias())
3150 const regex_t_sptr name_not_regex = priv_->get_name_not_regex();
3158 && fn->
get_symbol()->get_alias_from_name(fname))
3168 symbol_name = sym->get_name();
3169 if (sym->has_aliases())
3172 a && !a->is_main_symbol();
3173 a = a->get_next_alias())
3183 string fn_return_type_name = fn->
get_type()->get_return_type()
3184 ?
static_cast<string>
3196 const regex_t_sptr return_type_regex = priv_->get_return_type_regex();
3197 if (return_type_regex
3198 && !
regex::match(return_type_regex, fn_return_type_name))
3204 string fn_sym_name, fn_sym_version;
3208 fn_sym_name = sym->get_name();
3209 fn_sym_version = sym->get_version().str();
3222 if (sym->has_aliases())
3225 a && !a->is_main_symbol();
3226 a = a->get_next_alias())
3227 if (a->get_name() != fn_sym_name)
3234 const regex_t_sptr symbol_name_regex = priv_->get_symbol_name_regex();
3235 if (symbol_name_regex && !
regex::match(symbol_name_regex, fn_sym_name))
3238 const regex_t_sptr symbol_name_not_regex =
3239 priv_->get_symbol_name_not_regex();
3240 if (symbol_name_not_regex
3249 if (sym->has_aliases())
3252 a && !a->is_main_symbol();
3253 a = a->get_next_alias())
3255 if (symbol_name_regex
3259 if (symbol_name_not_regex
3276 const regex_t_sptr symbol_version_regex =
3277 priv_->get_symbol_version_regex();
3278 if (symbol_version_regex
3279 && !
regex::match(symbol_version_regex, fn_sym_version))
3287 type_base_sptr parm_type;
3289 for (parameter_specs_type::const_iterator p =
3294 size_t index = (*p)->get_index();
3296 fn_type->get_parm_at_index_from_first_non_implicit_parm(index);
3300 string fn_parm_type_qualified_name;
3303 parm_type = fn_parm->get_type();
3304 fn_parm_type_qualified_name =
3308 const string& tn = (*p)->get_parameter_type_name();
3311 if (tn != fn_parm_type_qualified_name)
3316 const regex_t_sptr parm_type_name_regex =
3317 (*p)->priv_->get_type_name_regex();
3318 if (parm_type_name_regex)
3321 fn_parm_type_qualified_name))
3386 if (!names_of_binaries_match(*
this, *ctxt))
3392 if (!sonames_of_binaries_match(*
this, *ctxt))
3398 bool no_symbol_name =
false, no_symbol_version =
false;
3408 const regex_t_sptr symbol_name_regex = priv_->get_symbol_name_regex();
3409 if (symbol_name_regex && !
regex::match(symbol_name_regex, sym_name))
3413 no_symbol_name =
true;
3423 const regex_t_sptr symbol_version_regex =
3424 priv_->get_symbol_version_regex();
3425 if (symbol_version_regex
3430 no_symbol_version =
true;
3432 if (no_symbol_name && no_symbol_version)
3467{
return dynamic_pointer_cast<function_suppression>(suppr);}
3482 (
static_cast<unsigned>(l) &
static_cast<unsigned>(r));
3498 (
static_cast<unsigned>(l) |
static_cast<unsigned>(r));
3511 const string& var_name)
3513 if (regex_t_sptr regexp = s.priv_->get_name_regex())
3518 else if (regex_t_sptr regexp = s.priv_->get_name_not_regex())
3523 else if (s.priv_->name_.empty())
3527 if (s.priv_->name_ != var_name)
3545 const string& var_linkage_name)
3547 if (regex_t_sptr regexp = s.priv_->get_symbol_name_regex())
3552 else if (regex_t_sptr regexp =
3553 s.priv_->get_symbol_name_not_regex())
3558 else if (s.priv_->symbol_name_.empty())
3562 if (s.priv_->symbol_name_ != var_linkage_name)
3580 const string& type_name)
3582 if (regex_t_sptr regexp = s.priv_->get_type_name_regex())
3606read_parameter_spec_from_string(
const string& str)
3608 string::size_type cur = 0;
3612 for (; cur < str.size(); ++cur)
3613 if (!isspace(str[cur]))
3618 if (str[cur] ==
'\'')
3621 for (; cur < str.size(); ++cur)
3622 if (!isdigit(str[cur]))
3625 index_str += str[cur];
3629 for (; cur < str.size(); ++cur)
3630 if (!isspace(str[cur]))
3633 bool is_regex =
false;
3634 if (str[cur] ==
'/')
3642 for (; cur < str.size(); ++cur)
3643 if (!isspace(str[cur]))
3645 if (is_regex && str[cur] ==
'/')
3647 type_name += str[cur];
3650 if (is_regex && str[cur] ==
'/')
3653 if (!index_str.empty() || !type_name.empty())
3655 std::string type_name_regex;
3658 type_name_regex = type_name;
3661 function_suppression::parameter_spec* p =
3662 new function_suppression::parameter_spec(atoi(index_str.c_str()),
3663 type_name, type_name_regex);
3678read_function_suppression(
const ini::config::section& section)
3682 if (section.get_name() !=
"suppress_function")
3685 static const char *
const sufficient_props[] = {
3688 "file_name_not_regexp",
3690 "soname_not_regexp",
3696 "return_type_regexp",
3698 "symbol_name_regexp",
3699 "symbol_name_not_regexp",
3701 "symbol_version_regexp",
3704 sizeof(sufficient_props)/
sizeof(
char*),
3713 string drop_artifact_str = drop_artifact
3714 ? drop_artifact->get_value()->as_string()
3719 string change_kind_str = change_kind_prop
3720 ? change_kind_prop->get_value()->as_string()
3725 string label_str = label_prop
3726 ? label_prop->get_value()->as_string()
3731 string file_name_regex_str =
3732 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
3736 string file_name_not_regex_str =
3737 file_name_not_regex_prop
3738 ? file_name_not_regex_prop->get_value()->as_string()
3743 string soname_regex_str =
3744 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
3748 string soname_not_regex_str =
3749 soname_not_regex_prop
3750 ? soname_not_regex_prop->get_value()->as_string()
3755 string name = name_prop
3756 ? name_prop->get_value()->as_string()
3761 string name_regex_str = name_regex_prop
3762 ? name_regex_prop->get_value()->as_string()
3767 string name_not_regex_str = name_not_regex_prop
3768 ? name_not_regex_prop->get_value()->as_string()
3773 string return_type_name = return_type_name_prop
3774 ? return_type_name_prop->get_value()->as_string()
3779 string return_type_regex_str = return_type_regex_prop
3780 ? return_type_regex_prop->get_value()->as_string()
3785 string sym_name = sym_name_prop
3786 ? sym_name_prop->get_value()->as_string()
3791 string sym_name_regex_str = sym_name_regex_prop
3792 ? sym_name_regex_prop->get_value()->as_string()
3797 string sym_name_not_regex_str = sym_name_not_regex_prop
3798 ? sym_name_not_regex_prop->get_value()->as_string()
3803 string sym_version = sym_ver_prop
3804 ? sym_ver_prop->get_value()->as_string()
3809 string sym_ver_regex_str = sym_ver_regex_prop
3810 ? sym_ver_regex_prop->get_value()->as_string()
3815 string allow_other_aliases = allow_other_aliases_prop
3816 ? allow_other_aliases_prop->get_value()->as_string()
3821 for (ini::config::properties_type::const_iterator p =
3822 section.get_properties().begin();
3823 p != section.get_properties().end();
3825 if ((*p)->get_name() ==
"parameter")
3829 if ((parm = read_parameter_spec_from_string
3830 (prop->get_value()->as_string())))
3831 parms.push_back(parm);
3834 result.reset(
new function_suppression(label_str,
3838 return_type_regex_str,
3843 sym_ver_regex_str));
3845 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
3847 || !name_regex_str.empty()
3848 || !name_not_regex_str.empty()
3849 || !sym_name.empty()
3850 || !sym_name_regex_str.empty()
3851 || !sym_name_not_regex_str.empty()))
3852 result->set_drops_artifact_from_ir(
true);
3854 if (!change_kind_str.empty())
3855 result->set_change_kind
3858 if (!allow_other_aliases.empty())
3859 result->set_allow_other_aliases(allow_other_aliases ==
"yes"
3860 || allow_other_aliases ==
"true");
3862 if (!name_not_regex_str.empty())
3863 result->set_name_not_regex_str(name_not_regex_str);
3865 if (!sym_name_not_regex_str.empty())
3866 result->set_symbol_name_not_regex_str(sym_name_not_regex_str);
3868 if (!file_name_regex_str.empty())
3869 result->set_file_name_regex_str(file_name_regex_str);
3871 if (!file_name_not_regex_str.empty())
3872 result->set_file_name_not_regex_str(file_name_not_regex_str);
3874 if (!soname_regex_str.empty())
3875 result->set_soname_regex_str(soname_regex_str);
3877 if (!soname_not_regex_str.empty())
3878 result->set_soname_not_regex_str(soname_not_regex_str);
3940 const string& name_regex_str,
3941 const string& symbol_name,
3942 const string& symbol_name_regex_str,
3943 const string& symbol_version,
3944 const string& symbol_version_regex,
3945 const string& type_name,
3946 const string& type_name_regex_str)
3948 priv_(new
priv(name, name_regex_str,
3949 symbol_name, symbol_name_regex_str,
3950 symbol_version, symbol_version_regex,
3951 type_name, type_name_regex_str))
3969 if (s ==
"variable-subtype-change")
3971 else if (s ==
"added-variable")
3973 else if (s ==
"deleted-variable")
3975 else if (s ==
"all")
3978 return UNDEFINED_CHANGE_KIND;
3986{
return priv_->change_kind_;}
3993{priv_->change_kind_ = k;}
4002{
return priv_->name_;}
4023{
return priv_->name_regex_str_;}
4035{priv_->name_regex_str_ = r;}
4042{
return priv_->name_not_regex_str_;}
4049{priv_->name_not_regex_str_ = r;}
4060{
return priv_->symbol_name_;}
4071{priv_->symbol_name_ = n;}
4084{
return priv_->symbol_name_regex_str_;}
4097{priv_->symbol_name_regex_str_ = r;}
4116{
return priv_->symbol_name_not_regex_str_;}
4136{priv_->symbol_name_not_regex_str_ = r;}
4145{
return priv_->symbol_version_;}
4154{priv_->symbol_version_ = v;}
4166{
return priv_->symbol_version_regex_str_;}
4178{priv_->symbol_version_regex_str_ = r;}
4189{
return priv_->type_name_;}
4200{priv_->type_name_ = n;}
4213{
return priv_->type_name_regex_str_;}
4226{priv_->type_name_regex_str_ = r;}
4281 if (!names_of_binaries_match(*
this, *ctxt))
4287 if (!sonames_of_binaries_match(*
this, *ctxt))
4306 const regex_t_sptr name_regex = priv_->get_name_regex();
4310 const regex_t_sptr name_not_regex = priv_->get_name_not_regex();
4311 if (name_not_regex &&
regex::match(name_not_regex, var_name))
4326 const regex_t_sptr sym_name_regex = priv_->get_symbol_name_regex();
4327 if (sym_name_regex && !
regex::match(sym_name_regex, var_sym_name))
4330 const regex_t_sptr sym_name_not_regex =
4331 priv_->get_symbol_name_not_regex();
4332 if (sym_name_not_regex &&
regex::match(sym_name_not_regex, var_sym_name))
4337 string var_sym_version =
4346 const regex_t_sptr symbol_version_regex =
4347 priv_->get_symbol_version_regex();
4348 if (symbol_version_regex
4349 && !
regex::match(symbol_version_regex, var_sym_version))
4354 string var_type_name =
4366 const regex_t_sptr type_name_regex = priv_->get_type_name_regex();
4367 if (type_name_regex && !
regex::match(type_name_regex, var_type_name))
4430 if (!names_of_binaries_match(*
this, *ctxt))
4435 if (!sonames_of_binaries_match(*
this, *ctxt))
4442 bool no_symbol_name =
false, no_symbol_version =
false;
4457 const regex_t_sptr sym_name_regex = priv_->get_symbol_name_regex();
4458 if (sym_name_regex && !
regex::match(sym_name_regex, sym_name))
4462 no_symbol_name =
true;
4472 const regex_t_sptr symbol_version_regex =
4473 priv_->get_symbol_version_regex();
4474 if (symbol_version_regex
4479 no_symbol_version =
true;
4481 if (no_symbol_name && no_symbol_version)
4516{
return dynamic_pointer_cast<variable_suppression>(s);}
4531 (
static_cast<unsigned>(l) &
static_cast<unsigned>(r));
4547 (
static_cast<unsigned>(l) |
static_cast<unsigned>(r));
4562 if (section.
get_name() !=
"suppress_variable")
4565 static const char *
const sufficient_props[] = {
4568 "file_name_not_regexp",
4570 "soname_not_regexp",
4575 "symbol_name_regexp",
4576 "symbol_name_not_regexp",
4578 "symbol_version_regexp",
4583 sizeof(sufficient_props)/
sizeof(
char*),
4592 string drop_artifact_str = drop_artifact
4593 ? drop_artifact->get_value()->as_string()
4598 string change_kind_str = change_kind_prop
4599 ? change_kind_prop->get_value()->as_string()
4604 string label_str = (label_prop
4605 ? label_prop->get_value()->as_string()
4610 string file_name_regex_str =
4611 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
4615 string file_name_not_regex_str =
4616 file_name_not_regex_prop
4617 ? file_name_not_regex_prop->get_value()->as_string()
4622 string soname_regex_str =
4623 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
4627 string soname_not_regex_str =
4628 soname_not_regex_prop
4629 ? soname_not_regex_prop->get_value()->as_string()
4634 string name_str = (name_prop
4635 ? name_prop->get_value()->as_string()
4640 string name_regex_str = (name_regex_prop
4641 ? name_regex_prop->get_value()->as_string()
4646 string name_not_regex_str = name_not_regex_prop
4647 ? name_not_regex_prop->get_value()->as_string()
4652 string symbol_name = (sym_name_prop
4653 ? sym_name_prop->get_value()->as_string()
4658 string symbol_name_regex_str = sym_name_regex_prop
4659 ? sym_name_regex_prop->get_value()->as_string()
4664 string symbol_name_not_regex_str = sym_name_not_regex_prop
4665 ? sym_name_not_regex_prop->get_value()->as_string()
4670 string symbol_version = sym_version_prop
4671 ? sym_version_prop->get_value()->as_string()
4676 string symbol_version_regex_str = sym_version_regex_prop
4677 ? sym_version_regex_prop->get_value()->as_string()
4682 string type_name_str = type_name_prop
4683 ? type_name_prop->get_value()->as_string()
4688 string type_name_regex_str = type_name_regex_prop
4689 ? type_name_regex_prop->get_value()->as_string()
4692 result.reset(
new variable_suppression(label_str,
4696 symbol_name_regex_str,
4698 symbol_version_regex_str,
4700 type_name_regex_str));
4702 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
4703 && (!name_str.empty()
4704 || !name_regex_str.empty()
4705 || !name_not_regex_str.empty()
4706 || !symbol_name.empty()
4707 || !symbol_name_regex_str.empty()
4708 || !symbol_name_not_regex_str.empty()))
4709 result->set_drops_artifact_from_ir(
true);
4711 if (!name_not_regex_str.empty())
4712 result->set_name_not_regex_str(name_not_regex_str);
4714 if (!symbol_name_not_regex_str.empty())
4715 result->set_symbol_name_not_regex_str(symbol_name_not_regex_str);
4717 if (!change_kind_str.empty())
4718 result->set_change_kind
4721 if (!file_name_regex_str.empty())
4722 result->set_file_name_regex_str(file_name_regex_str);
4724 if (!file_name_not_regex_str.empty())
4725 result->set_file_name_not_regex_str(file_name_not_regex_str);
4727 if (!soname_regex_str.empty())
4728 result->set_soname_regex_str(soname_regex_str);
4730 if (!soname_not_regex_str.empty())
4731 result->set_soname_not_regex_str(soname_not_regex_str);
4754 const string& var_name,
4755 const string& var_linkage_name,
4756 bool require_drop_property)
4758 for (
auto i : supprs)
4761 if (require_drop_property && !i->get_drops_artifact_from_ir())
4763 if (!var_name.empty()
4766 if (!var_linkage_name.empty()
4790file_suppression::file_suppression(
const string& label,
4791 const string& fname_regex_str,
4792 const string& fname_not_regex_str)
4795 fname_not_regex_str)
4819 if (file_path.empty())
4825 bool has_regexp =
false;
4827 if (regex_t_sptr regexp = suppression_base::priv_->get_file_name_regex())
4834 if (regex_t_sptr regexp = suppression_base::priv_->get_file_name_not_regex())
4864 if (section.
get_name() !=
"suppress_file")
4867 static const char *
const sufficient_props[] = {
4869 "file_name_not_regexp",
4871 "soname_not_regexp",
4874 sizeof(sufficient_props)/
sizeof(
char*),
4880 string label_str = (label_prop
4881 ? label_prop->get_value()->as_string()
4886 string file_name_regex_str =
4887 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
4891 string file_name_not_regex_str =
4892 file_name_not_regex_prop
4893 ? file_name_not_regex_prop->get_value()->as_string()
4898 string soname_regex_str =
4899 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
4903 string soname_not_regex_str =
4904 soname_not_regex_prop
4905 ? soname_not_regex_prop->get_value()->as_string()
4909 file_name_regex_str,
4910 file_name_not_regex_str));
4912 if (!soname_regex_str.empty())
4914 result->set_soname_regex_str(soname_regex_str);
4915 result->set_drops_artifact_from_ir(
true);
4918 if (!soname_not_regex_str.empty())
4920 result->set_soname_not_regex_str(soname_not_regex_str);
4921 result->set_drops_artifact_from_ir(
true);
4937{
return dynamic_pointer_cast<file_suppression>(s);}
4954 for (suppressions_type::const_iterator i = sprs.begin(); i != sprs.end(); ++i)
4956 if (s->suppresses_file(file_path))
4975 return suppr.priv_->matches_soname(soname);
4991 const string& filename,
4995 || suppr.priv_->matches_binary_name(filename));
5004 static const char *OPAQUE_TYPES_SUPPR_SPEC_NAME =
5005 "libabigail::OPAQUE_TYPE_LABEL";
5007 return OPAQUE_TYPES_SUPPR_SPEC_NAME;
5052 if (!s.priv_->matches_soname(fe.
dt_soname()))
5059 if (!s.priv_->matches_binary_name(fe.
corpus_path()))
5083 const string& fn_name)
5098 else if (s.priv_->name_.empty())
5102 if (s.priv_->name_ != fn_name)
5122suppression_matches_function_sym_name(
const fe_iface& fe,
5124 const string& fn_linkage_name)
5139 else if (s.priv_->symbol_name_.empty())
5143 if (s.priv_->symbol_name_ != fn_linkage_name)
5164 const string& var_name)
5187 const string& var_linkage_name)
5212 const string& type_name,
5241 symbol->get_name());
5244 symbol->get_name());
5264 const string& sym_name,
5296 const string& fn_name,
5297 const string& fn_linkage_name,
5298 bool require_drop_property)
5303 if (require_drop_property && !i->get_drops_artifact_from_ir())
5305 if (!fn_name.empty()
5306 && suppression_matches_function_name(fe, *suppr, fn_name))
5308 if (!fn_linkage_name.empty()
5309 && suppression_matches_function_sym_name(fe, *suppr,
5336 const string& var_name,
5337 const string& var_linkage_name,
5338 bool require_drop_property)
5343 if (require_drop_property && !i->get_drops_artifact_from_ir())
5345 if (!var_name.empty()
5348 if (!var_linkage_name.empty()
5379 const string& type_name,
5381 bool& type_is_opaque,
5382 bool require_drop_property)
5387 if (require_drop_property && !i->get_drops_artifact_from_ir())
5394 type_is_opaque =
true;
5400 type_is_opaque =
false;
5423 uint64_t range_begin = 0, range_end = 0;
5434 if (range_begin > range_end)
5449 if (dm_offset < range_begin || dm_offset > range_end)
This header declares filters for the diff trees resulting from comparing ABI Corpora.
This file contains the declarations for the fe_iface a.k.a "Front End Interface".
#define ABG_ASSERT(cond)
This is a wrapper around the 'assert' glibc call. It allows for its argument to have side effects,...
This file contains the declarations for the ini file reader used in the libabigail library.
This contains the private implementation of the suppression engine of libabigail.
This type abstracts changes for a class_decl.
class_decl_sptr first_class_decl() const
class_decl_sptr second_class_decl() const
Getter of the second class involved in the diff.
This is the base class of class_diff and union_diff.
const unsigned_var_diff_sptr_map & changed_data_members() const
Getter of the map of data members that got replaced by another data member. The key of the map is the...
class_or_union_sptr first_class_or_union() const
const string_decl_base_sptr_map & inserted_data_members() const
Getter for the data members that got inserted.
The context of the diff. This type holds various bits of information that is going to be used through...
const corpus_diff_sptr & get_corpus_diff() const
Get the corpus diff for the current context.
The abstraction of a change between two ABI artifacts, a.k.a an artifact change.
type_or_decl_base_sptr second_subject() const
Getter of the second subject of the diff.
type_or_decl_base_sptr first_subject() const
Getter of the first subject of the diff.
const diff_context_sptr context() const
Getter of the context of the current diff.
An abstraction of a diff between entities that are of a different kind (disctinct).
Abstraction of a diff between two enums.
const string_changed_enumerator_map & changed_enumerators() const
const enum_type_decl_sptr first_enum() const
const string_enumerator_map & deleted_enumerators() const
const enum_type_decl_sptr second_enum() const
Abstraction of a diff between two function_decl.
const function_decl_sptr second_function_decl() const
const function_decl_sptr first_function_decl() const
The abstraction of a diff between two pointers.
The abstraction of a diff between two references.
The base class of diff between types.
Abstracts a diff between two instances of var_decl.
This type abstracts the configuration information of the library.
The base class of all libabigail front-ends: The Front End Interface.
suppr::suppressions_type & suppressions()
Getter of the vector of suppression specifications associated with the current front-end.
const std::string & corpus_path() const
Getter of the path to the file which an ABI corpus is to be created for.
const string & dt_soname() const
Getter for the SONAME of the analyzed binary.
The abstraction of one section of the .ini config.
const string & get_name() const
Get the name of the section.
property_sptr find_property(const string &prop_name) const
Find a property that has a given name.
const vector< string > & get_content() const
Getter of the content of the list_property_value.
virtual const string & as_string() const
Convert the string property value into a string.
The base type of class_decl and union_decl.
const data_members & get_data_members() const
Get the data members of this class_or_union.
virtual void get_qualified_name(interned_string &qualified_name, bool internal=false) const
Compute the qualified name of the decl.
const string & str() const
Getter for the version name.
Abstraction of an elf symbol.
bool is_variable() const
Test if the current instance of elf_symbol is a variable symbol or not.
const string & get_name() const
Getter for the name of the elf_symbol.
bool is_function() const
Test if the current instance of elf_symbol is a function symbol or not.
type
The type of a symbol.
version & get_version() const
Getter for the version of the current instanc of elf_symbol.
Abstraction for a function declaration.
shared_ptr< parameter > parameter_sptr
Convenience typedef for a shared pointer on a function_decl::parameter.
const function_type_sptr get_type() const
Return the type of the current instance of function_decl.
const elf_symbol_sptr get_symbol() const
Gets the the underlying ELF symbol for the current variable, that was set using function_decl::set_sy...
The source location of a token.
void expand(std::string &path, unsigned &line, unsigned &column) const
Expand the location into a tripplet path, line and column number.
Abstracts a variable declaration.
virtual const interned_string & get_qualified_name(bool internal=false) const
Get the qualified name of a given variable or data member.
const elf_symbol_sptr get_symbol() const
Gets the the underlying ELF symbol for the current variable, that was set using var_decl::set_symbol(...
const type_base_sptr get_type() const
Getter of the type of the variable.
Abstraction of a suppression specification to avoid loading a file.
virtual ~file_suppression()
Destructor of file_suppression.
bool suppresses_file(const string &file_path)
Test if a instances of this file_suppression suppresses a given file.
virtual bool suppresses_diff(const diff *diff) const
Test if instances of this file_suppression suppresses a certain instance of diff.
const string & get_parameter_type_name() const
Getter for the type name of the parameter designated by this specification.
const string & get_parameter_type_name_regex_str() const
Getter for the regular expression that defines a set of type names for the parameter designated by th...
void set_parameter_type_name_regex_str(const string &)
Setter for the regular expression that defines a set of type names for the parameter designated by th...
void set_parameter_type_name(const string &)
Setter for the type name of the parameter designated by this specification.
void set_index(size_t)
Setter for the index of the parameter designated by this specification.
size_t get_index() const
Getter for the index of the parameter designated by this specification.
Abstraction of a function suppression specification.
void set_name_regex_str(const string &)
Setter for a regular expression for a family of names of functions the user wants the current specifi...
change_kind get_change_kind() const
Getter of the "change-kind" property.
const string & get_symbol_version() const
Getter for the name of the version of the symbol of the function the user wants this specification to...
void set_change_kind(change_kind k)
Setter of the "change-kind" property.
change_kind
The kind of change the current function suppression should apply to.
@ ALL_CHANGE_KIND
This represents all the changes possibly described by this enum. It's a logical 'OR' of all the chang...
@ ADDED_FUNCTION_CHANGE_KIND
The function was added to the second subject of the diff.
@ FUNCTION_SUBTYPE_CHANGE_KIND
A change in a sub-type of the function.
@ DELETED_FUNCTION_CHANGE_KIND
The function was deleted from the second subject of the diff.
const string & get_symbol_version_regex_str() const
Getter for a regular expression for a family of versions of symbols of functions the user wants the c...
bool suppresses_function(const function_decl *fn, change_kind k, const diff_context_sptr ctxt) const
Evaluate the current function suppression specification on a given function_decl and say if a report ...
const string & get_return_type_name() const
Getter for the name of the return type of the function the user wants this specification to designate...
static change_kind parse_change_kind(const string &)
Parses a string containing the content of the "change-kind" property and returns the an instance of f...
bool suppresses_function_symbol(const elf_symbol *sym, change_kind k, const diff_context_sptr ctxt)
Evaluate the current function suppression specification on a given elf_symbol and say if a report abo...
void set_return_type_name(const string &)
Setter for the name of the return type of the function the user wants this specification to designate...
const string & get_name() const
Getter for the name of the function the user wants the current specification to designate....
const string & get_symbol_name() const
Getter for the name of symbol of the function the user wants this specification to designate.
vector< parameter_spec_sptr > parameter_specs_type
Convenience typedef for vector of parameter_spec_sptr.
void set_symbol_name_regex_str(const string &)
Setter for a regular expression for a family of names of symbols of functions the user wants this spe...
const string & get_symbol_name_regex_str() const
Getter for a regular expression for a family of names of symbols of functions the user wants this spe...
void set_symbol_name_not_regex_str(const string &)
Setter for a regular expression for a family of names of symbols of functions the user wants this spe...
void set_name_not_regex_str(const string &)
Setter for a regular expression for a family of names of functions the user wants the current specifi...
void set_symbol_version(const string &)
Setter for the name of the version of the symbol of the function the user wants this specification to...
void set_parameter_specs(parameter_specs_type &)
Setter for a vector of parameter specifications to specify properties of the parameters of the functi...
void set_name(const string &)
Setter for the name of the function the user wants the current specification to designate....
const parameter_specs_type & get_parameter_specs() const
Getter for a vector of parameter specifications to specify properties of the parameters of the functi...
virtual bool suppresses_diff(const diff *diff) const
Evaluate this suppression specification on a given diff node and say if the diff node should be suppr...
void set_return_type_regex_str(const string &r)
Setter for a regular expression for a family of return type names for functions the user wants the cu...
const string & get_name_not_regex_str() const
Getter for a regular expression of a family of names of functions the user wants the current specific...
void set_symbol_name(const string &n)
Setter for the name of symbol of the function the user wants this specification to designate.
const string & get_symbol_name_not_regex_str() const
Getter for a regular expression for a family of names of symbols of functions the user wants this spe...
void append_parameter_specs(const parameter_spec_sptr)
Append a specification of a parameter of the function specification.
void set_allow_other_aliases(bool f)
Setter for the "allow_other_aliases" property of the function suppression specification.
void set_symbol_version_regex_str(const string &)
Setter for a regular expression for a family of versions of symbols of functions the user wants the c...
function_suppression()
Default constructor for the function_suppression type.
const string & get_name_regex_str() const
Getter for a regular expression for a family of names of functions the user wants the current specifi...
bool get_allow_other_aliases() const
Getter for the "allow_other_aliases" property of the function suppression specification.
const string & get_return_type_regex_str() const
Getter for a regular expression for a family of return type names for functions the user wants the cu...
shared_ptr< parameter_spec > parameter_spec_sptr
Convenience typedef for shared_ptr of parameter_spec.
The base class of suppression specifications that are defined by the negation of matching clauses.
virtual ~negated_suppression_base()
Destructor of the negated_suppression_base.
negated_suppression_base()
Constructor of the negated_suppression_base.
negated_type_suppression(const string &label, const string &type_name_regexp, const string &type_name)
Constructor for negated_type_suppression.
virtual bool suppresses_diff(const diff *diff) const
Evaluate this suppression specification on a given diff node and say if the diff node should be suppr...
virtual ~negated_type_suppression()
Destructor of the negated_type_suppression type.
The private data of suppression_base.
Base type of a direct suppression specifications types.
const string & get_file_name_regex_str() const
Getter for the "file_name_regex" property of the current instance of suppression_base.
bool get_drops_artifact_from_ir() const
Tests if the current suppression specification is to avoid adding the matched ABI artifact to the int...
bool get_is_artificial() const
Test is the suppression specification is artificial.
void set_file_name_regex_str(const string ®exp)
Setter for the "file_name_regex" property of the current instance of suppression_base.
void set_soname_not_regex_str(const string ®exp)
Setter of the "soname_not_regex_str property of the current instance of suppression_base.
const string & get_soname_not_regex_str() const
Getter of the "soname_not_regex_str property of the current instance of suppression_base.
void set_file_name_not_regex_str(const string ®exp)
Setter for the "file_name_not_regex" property of the current instance of suppression_base.
void set_is_artificial(bool)
Set a flag saying if the suppression specification is artificial or not.
const string & get_label() const
Getter for the label associated to this suppression specification.
const string & get_file_name_not_regex_str() const
Getter for the "file_name_not_regex" property of the current instance of suppression_base.
void set_label(const string &)
Setter for the label associated to this suppression specification.
const string & get_soname_regex_str() const
Getter of the "soname_regex_str property of the current instance of suppression_base.
bool has_soname_related_property() const
Test if the current suppression has a property related to SONAMEs.
void set_soname_regex_str(const string ®exp)
Setter of the "soname_regex_str property of the current instance of suppression_base.
bool has_file_name_related_property() const
Test if the current suppression has a property related to file name.
void set_drops_artifact_from_ir(bool)
Set the flag that says whether the current suppression specification is to avoid adding the matched A...
The abstraction of the boundary of an insertion_range, in the context of a type_suppression.
virtual ~boundary()
Destructor of type_suppression::insertion_range::boundary.
boundary()
Default constructor of type_suppression::insertion_range::boundary.
An insertion_range boundary that is expressed as function call expression. The (integer) value of tha...
~fn_call_expr_boundary()
Destructor of type_suppression::insertion_range::fn_call_expr_boundary.
ini::function_call_expr_sptr as_function_call_expr() const
Returns the function call expression value of the current boundary.
An insertion_range boundary that is expressed as an integer value. That integer value is usually a bi...
~integer_boundary()
Destructor of type_suppression::insertion_range::integer_boundary.
uint64_t as_integer() const
Return the integer value of the current instance of type_suppression::insertion_range::integer_bounda...
An insertion_range boundary that is expressed as a named constant that is to be evaluated later in th...
const string & get_name() const
Getter for the name of the named boundary.
static insertion_range::named_boundary_sptr create_named_boundary(const string &)
Create a named boundary.
shared_ptr< named_boundary > named_boundary_sptr
Convenience typedef for a shared_ptr to a named_boundary.
static insertion_range::integer_boundary_sptr create_integer_boundary(int value)
Create an integer boundary.
static insertion_range::fn_call_expr_boundary_sptr create_fn_call_expr_boundary(ini::function_call_expr_sptr)
Create a function call expression boundary.
shared_ptr< fn_call_expr_boundary > fn_call_expr_boundary_sptr
Convenience typedef for a shared_ptr to a fn_call_expr_boundary.
boundary_sptr end() const
Getter for the end of the range.
static bool boundary_value_is_end(uint64_t value)
Test if a given value supposed to be inside an insertion range represents the end of the range.
shared_ptr< integer_boundary > integer_boundary_sptr
Convenience typedef for a shared_ptr to a integer_boundary.
static bool eval_boundary(const boundary_sptr boundary, const class_or_union *context, uint64_t &value)
Evaluate an insertion range boundary to get a resulting integer value.
shared_ptr< boundary > boundary_sptr
Convenience typedef for a shared_ptr to boundary.
boundary_sptr begin() const
Getter for the beginning of the range.
insertion_range()
Default Constructor of type_suppression::insertion_range.
The private data for type_suppression.
Abstraction of a type suppression specification.
void set_type_name_not_regex_str(const string &name_regex_str)
Setter for the "type_name_not_regex_str" property of the type suppression specification.
const vector< string > & get_changed_enumerator_names() const
Getter of the vector of the changed enumerators that are supposed to be suppressed....
void set_type_name_regex_str(const string &name_regex_str)
Setter for the "type_name_regex" property of the type suppression specification.
void set_type_name(const string &name)
Setter for the name of the type about which diff reports should be suppressed.
void set_consider_type_kind(bool f)
Setter of the property that says whether to consider the kind of type this suppression is about.
reach_kind get_reach_kind() const
Getter of the way the diff node matching the current suppression specification is to be reached.
const vector< regex::regex_t_sptr > & get_changed_enumerators_regexp() const
Getter of the vector of the regular expression strings for changed enumerators that are supposed to b...
void set_changed_enumerators_regexp(const vector< regex::regex_t_sptr > &)
Setter of the vector of the regular expression strings for changed enumerators that are supposed to b...
const string & get_source_location_to_keep_regex_str() const
Getter of the regular expression string that designates the source location paths of types that shoul...
vector< insertion_range_sptr > insertion_ranges
A convenience typedef for a vector of insertion_range_sptr.
void set_changed_enumerator_names(const vector< string > &)
Setter of the vector of changed enumerators that are supposed to be suppressed. Note that this will b...
bool has_strict_fam_conversion() const
Getter of the "has_string_fam_conversion" property.
void set_source_location_to_keep_regex_str(const string &)
Setter of the regular expression string that designates the source location paths of types that shoul...
void set_source_locations_to_keep(const unordered_set< string > &)
Setter for the array of source location paths of types that should *NOT* be suppressed.
bool get_consider_type_kind() const
Getter of the property that says whether to consider the kind of type this suppression is about.
type_kind
The kind of the type the current type suppression is supposed to be about.
const string & get_type_name_regex_str() const
Getter for the "type_name_regex" property of the type suppression specification.
void set_consider_reach_kind(bool f)
Set a flag saying if the current type suppression specification suggests to consider how the matching...
type_kind get_type_kind() const
Getter of the kind of type this suppression is about.
void set_type_kind(type_kind k)
Setter of the kind of type this suppression is about.
void set_has_strict_fam_conversion(bool)
Setter of the "has_string_fam_conversion" property.
const insertion_ranges & get_data_member_insertion_ranges() const
Getter for the vector of data member insertion range that specifiers where a data member is inserted ...
const string_set_type & get_potential_data_member_names() const
Getter of the "potential_data_member_names" property.
reach_kind
The different ways through which the type diff has been reached.
@ REFERENCE_REACH_KIND
The type diff has been reached (from a function or variable change) through a reference; you know,...
@ POINTER_REACH_KIND
The type diff has been reached (from a function or variable change) through a pointer.
@ REFERENCE_OR_POINTER_REACH_KIND
The type diff has been reached (from a function or variable change) through either a reference or a p...
@ DIRECT_REACH_KIND
The type diff has been reached (from a function or variable change) directly.
bool get_consider_reach_kind() const
Test if the current type suppression specification suggests to consider how the matching diff node is...
const unordered_set< string > & get_source_locations_to_keep() const
Getter for the array of source location paths of types that should *NOT* be suppressed.
const string & get_type_name_not_regex_str() const
Getter for the "type_name_not_regex_str" property of the type suppression specification.
virtual bool suppresses_diff(const diff *diff) const
Evaluate this suppression specification on a given diff node and say if the diff node should be suppr...
bool suppresses_type(const type_base_sptr &type, const diff_context_sptr &ctxt) const
Test if the current instance of type_suppression suppresses a change reports about a given type.
void set_has_size_change(bool flag)
Setter of the "has_size_change" property.
void set_reach_kind(reach_kind k)
Setter of the way the diff node matching the current suppression specification is to be reached.
void set_potential_data_member_names(const string_set_type &) const
Setter of the "potential_data_member_names" property.
bool get_has_size_change() const
Getter of the "has_size_change" property.
const string & get_potential_data_member_names_regex_str() const
Getter of the "potential_data_member_names_regex" string.
const string & get_type_name() const
Getter for the name of the type about which diff reports should be suppressed.
void set_data_member_insertion_ranges(const insertion_ranges &r)
Setter for the vector of data member insertion ranges that specifies where a data member is inserted ...
void set_potential_data_member_names_regex_str(const string &) const
Setter of the "potential_data_member_names_regex" string.
shared_ptr< insertion_range > insertion_range_sptr
A convenience typedef for a shared pointer to insertion_range.
The abstraction of a variable suppression specification.
void set_symbol_name(const string &)
Setter for the name of the symbol of the variable the user wants the current specification to designa...
void set_name_regex_str(const string &)
Setter for the regular expression for a family of names of variables the user wants the current speci...
virtual ~variable_suppression()
Virtual destructor for the @erf variable_suppression type. variable_suppression type.
const string & get_symbol_version() const
Getter for the version of the symbol of the variable the user wants the current specification to desi...
variable_suppression(const string &label="", const string &name="", const string &name_regex_str="", const string &symbol_name="", const string &symbol_name_regex_str="", const string &symbol_version="", const string &symbol_version_regex_str="", const string &type_name="", const string &type_name_regex_str="")
Constructor for the variable_suppression type.
void set_change_kind(change_kind k)
Setter of the "change_kind" property.
static change_kind parse_change_kind(const string &)
Parses a string containing the content of the "change-kind" property and returns the an instance of v...
change_kind
The kind of change the current variable suppression should apply to.
@ ADDED_VARIABLE_CHANGE_KIND
The variable was added to the second second subject of the diff.
@ ALL_CHANGE_KIND
This represents all the changes possibly described by this enum. It's a logical 'OR' of all the chang...
@ DELETED_VARIABLE_CHANGE_KIND
The variable was deleted from the second subject of the diff.
@ VARIABLE_SUBTYPE_CHANGE_KIND
A change in a sub-type of the variable.
const string & get_symbol_version_regex_str() const
Getter of the regular expression for a family of versions of symbol for the variables the user wants ...
const string & get_name() const
Getter for the name of the variable the user wants the current specification to designate....
const string & get_symbol_name() const
Getter for the name of the symbol of the variable the user wants the current specification to designa...
void set_symbol_name_regex_str(const string &)
Setter of the regular expression for a family of symbol names of the variables this specification is ...
const string & get_symbol_name_regex_str() const
Getter of the regular expression for a family of symbol names of the variables this specification is ...
const string & get_type_name_regex_str() const
Getter for the regular expression for a family of type names of variables the user wants the current ...
void set_symbol_name_not_regex_str(const string &)
Setter for a regular expression for a family of names of symbols of variables the user wants this spe...
void set_type_name(const string &)
Setter for the name of the type of the variable the user wants the current specification to designate...
change_kind get_change_kind() const
Getter of the "change_king" property.
void set_name_not_regex_str(const string &)
Setter for the "name_not_regexp" property of the specification.
void set_symbol_version(const string &)
Setter for the version of the symbol of the variable the user wants the current specification to desi...
bool suppresses_variable(const var_decl *var, change_kind k, const diff_context_sptr cxt) const
Evaluate the current variable suppression specification on a given var_decl and say if a report about...
void set_name(const string &)
Setter for the name of the variable the user wants the current specification to designate....
const string & get_name_not_regex_str() const
Getter for the "name_not_regexp" property of the specification.
const string & get_symbol_name_not_regex_str() const
Getter for a regular expression for a family of names of symbols of variables the user wants this spe...
void set_type_name_regex_str(const string &)
Setter for the regular expression for a family of type names of variables the user wants the current ...
void set_symbol_version_regex_str(const string &)
Setter of the regular expression for a family of versions of symbol for the variables the user wants ...
const string & get_type_name() const
Getter for the name of the type of the variable the user wants the current specification to designate...
bool suppresses_diff(const diff *d) const
Evaluate this suppression specification on a given diff node and say if the diff node should be suppr...
const string & get_name_regex_str() const
Getter for the regular expression for a family of names of variables the user wants the current speci...
bool suppresses_variable_symbol(const elf_symbol *sym, change_kind k, const diff_context_sptr cxt) const
Evaluate the current variable suppression specification on a given elf_symbol and say if a report abo...
bool has_strict_fam_conversion(const class_decl_sptr &first, const class_decl_sptr &second)
Test if a class with a fake flexible data member got changed into a class with a real fexible data me...
const diff * peel_qualified_diff(const diff *dif)
If a diff node is about changes between two qualified types, get the diff node about changes between ...
const pointer_diff * is_pointer_diff(const diff *diff)
Test if a diff node is about differences between two pointers.
shared_ptr< diff_context > diff_context_sptr
Convenience typedef for a shared pointer of diff_context.
const function_decl_diff * is_function_decl_diff(const diff *diff)
Test if a diff node is about differences between functions.
visiting_kind operator&(visiting_kind l, visiting_kind r)
The overloaded and operator for visiting_kind.
const distinct_diff * is_distinct_diff(const diff *diff)
Test if a diff node is about differences between two diff nodes of different kinds.
visiting_kind operator|(visiting_kind l, visiting_kind r)
The overloaded or operator for visiting_kind.
const class_or_union_diff * is_class_or_union_diff(const diff *d)
Test if a diff node is a class_or_union_diff node.
const diff * get_typedef_diff_underlying_type_diff(const diff *diff)
Return the leaf underlying diff node of a typedef_diff node.
const var_diff * is_var_diff(const diff *diff)
Test if a diff node is about differences between variables.
const type_diff_base * is_type_diff(const diff *diff)
Test if a diff node is about differences between types.
const reference_diff * is_reference_diff(const diff *diff)
Test if a diff node is about differences between two references.
shared_ptr< list_property_value > list_property_value_sptr
A convenience typedef for a shared_ptr to list_property_value.
bool read_function_call_expr(std::istream &input, function_call_expr_sptr &expr)
Read a function call expression and build its representation.
list_property * is_list_property(const property *p)
Test if an instance of a property is actually an instance of list_property.
shared_ptr< property > property_sptr
Convenience typefef for shared_ptr to property.
shared_ptr< list_property > list_property_sptr
A convenience typedef for a shared_ptr to a list_property.
shared_ptr< config > config_sptr
A convenience typedef for a shared pointer to config.
list_property_value * is_list_property_value(const property_value *v)
Test if an instance of @property_value is a list_property_value.
bool read_config(istream &input, config &conf)
Parse an ini config file from an input stream.
shared_ptr< tuple_property > tuple_property_sptr
Convenience typedef for a shared_ptr of tuple_property.
shared_ptr< simple_property > simple_property_sptr
Convenience typedef for a shared_ptr to an simple_property.
shared_ptr< function_call_expr > function_call_expr_sptr
Convenience typedef for a shared pointer to function_call_expr.
shared_ptr< string_property_value > string_property_value_sptr
A convenience typedef for a shared_ptr to string_property_value.
string_property_value * is_string_property_value(const property_value *v)
Test if a given property value is a string property value.
tuple_property * is_tuple_property(const property *p)
Test if an instance of property is an instance of tuple_property.
shared_ptr< tuple_property_value > tuple_property_value_sptr
Convenience typedef for a shared_ptr to a tuple_property_value.
simple_property * is_simple_property(const property *p)
Tests if a property is a simple property.
tuple_property_value * is_tuple_property_value(const property_value *v)
Test if a given instance of property_value is an instance of tuple_property_value too.
var_decl_sptr get_last_data_member(const class_or_union &klass)
Get the last data member of a class type.
shared_ptr< function_decl > function_decl_sptr
Convenience typedef for a shared pointer on a function_decl.
bool is_type(const type_or_decl_base &tod)
Test whether a declaration is a type.
shared_ptr< elf_symbol > elf_symbol_sptr
A convenience typedef for a shared pointer to elf_symbol.
var_decl_sptr find_last_data_member_matching_regexp(const class_or_union &t, const regex::regex_t_sptr ®ex)
Find the last data member of a class or union which name matches a regular expression.
bool is_class_type(const type_or_decl_base &t)
Test whether a type is a class.
shared_ptr< class_decl > class_decl_sptr
Convenience typedef for a shared pointer on a class_decl.
const type_decl * is_type_decl(const type_or_decl_base *t)
Test whether a type is a type_decl (a builtin type).
string get_name(const type_or_decl_base *tod, bool qualified)
Build and return a copy of the name of an ABI artifact that is either a type or a decl.
typedef_decl_sptr is_typedef(const type_or_decl_base_sptr t)
Test whether a type is a typedef.
shared_ptr< function_type > function_type_sptr
Convenience typedef for a shared pointer on a function_type.
bool elf_symbol_is_function(elf_symbol::type t)
Test if the type of an ELF symbol denotes a function symbol.
const enum_type_decl * is_enum_type(const type_or_decl_base *d)
Test if a decl is an enum_type_decl.
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
shared_ptr< scope_decl > scope_decl_sptr
Convenience typedef for a shared pointer on a scope_decl.
string build_qualified_name(const scope_decl_sptr scope, const string &name)
Build and return a qualified name from a name and its scope.
bool get_data_member_is_laid_out(const var_decl &m)
Test whether a data member is laid out.
bool get_next_data_member_offset(const class_or_union *klass, const var_decl_sptr &dm, uint64_t &offset)
Get the offset of the non-static data member that comes after a given one.
var_decl * is_var_decl(const type_or_decl_base *tod)
Tests if a declaration is a variable declaration.
decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
uint64_t get_data_member_offset(const var_decl &m)
Get the offset of a data member.
location get_location(const type_base_sptr &type)
Get the location of the declaration of a given type.
bool is_union_type(const type_or_decl_base &t)
Test if a type is a union_decl.
type_base_sptr peel_typedef_type(const type_base_sptr &type)
Return the leaf underlying type node of a typedef_decl node.
var_decl_sptr find_first_data_member_matching_regexp(const class_or_union &t, const regex::regex_t_sptr &r)
Find the first data member of a class or union which name matches a regular expression.
const decl_base * get_type_declaration(const type_base *t)
Get the declaration for a given type.
var_decl_sptr has_flexible_array_data_member(const class_decl &klass)
Test if the last data member of a class is an array with non-finite data member.
array_type_def * is_array_type(const type_or_decl_base *type, bool look_through_qualifiers)
Test if a type is an array_type_def.
function_decl * is_function_decl(const type_or_decl_base *d)
Test whether a declaration is a function_decl.
bool elf_symbol_is_variable(elf_symbol::type t)
Test if the type of an ELF symbol denotes a function symbol.
method_type_sptr is_method_type(const type_or_decl_base_sptr &t)
Test whether a type is a method_type.
bool match(const regex_t_sptr &r, const std::string &str)
See if a string matches a regex.
regex_t_sptr compile(const std::string &str)
Compile a regex from a string.
std::shared_ptr< regex_t > regex_t_sptr
A convenience typedef for a shared pointer of regex_t.
type_suppression::insertion_range::fn_call_expr_boundary_sptr is_fn_call_expr_boundary(type_suppression::insertion_range::boundary_sptr b)
Tests if a given instance of type_suppression::insertion_range::boundary is actually a function call ...
bool suppression_matches_type(const suppr::type_suppression &s, const string &type_name)
Test if a type suppression matches a type designated by its fully qualified name.
type_suppression::insertion_range::integer_boundary_sptr is_integer_boundary(type_suppression::insertion_range::boundary_sptr b)
Tests if a given instance of type_suppression::insertion_range::boundary is actually an integer bound...
shared_ptr< variable_suppression > variable_suppression_sptr
A convenience typedef for a shared pointer to variable_suppression.
shared_ptr< negated_suppression_base > negated_suppression_sptr
A convenience typedef for a shared pointer to negated_suppression_base.
const char * get_opaque_types_suppr_spec_label()
shared_ptr< file_suppression > file_suppression_sptr
A convenience typedef for a shared_ptr to file_suppression.
vector< suppression_sptr > suppressions_type
Convenience typedef for a vector of suppression_sptr.
type_suppression::insertion_range::named_boundary_sptr is_named_boundary(type_suppression::insertion_range::boundary_sptr b)
Test if a given instance of type_suppression::insertion_range::boundary is actually a named boundary.
shared_ptr< function_suppression > function_suppression_sptr
Convenience typedef for a shared pointer to function_suppression.
variable_suppression_sptr is_variable_suppression(const suppression_sptr s)
Test if an instance of suppression is an instance of variable_suppression.
bool is_opaque_type_suppr_spec(const type_suppression &s)
Test if a type suppression specification represents a private type suppression automatically generate...
bool variable_is_suppressed(const suppr::suppressions_type &supprs, const string &var_name, const string &var_linkage_name, bool require_drop_property)
Test if a given variable is suppressed by at least one suppression specification among a vector of su...
bool suppression_can_match(const fe_iface &fe, const suppression_base &s)
Test if a given suppression specification can match an ABI artifact coming from the corpus being anal...
file_suppression_sptr is_file_suppression(const suppression_sptr s)
Test if a given suppression specification is a file suppression specification.
bool is_elf_symbol_suppressed(const fe_iface &fe, const elf_symbol_sptr &symbol)
Test if an ELF symbol is suppressed by at least one of the suppression specifications associated with...
bool suppression_matches_type_name(const suppr::type_suppression &s, const string &type_name)
Test if a type suppression specification matches a type name.
shared_ptr< type_suppression > type_suppression_sptr
Convenience typedef for a shared pointer to type_suppression.
function_suppression_sptr is_function_suppression(const suppression_sptr suppr)
Test if an instance of suppression is an instance of function_suppression.
bool suppression_matches_variable_name(const suppr::variable_suppression &s, const string &var_name)
Test if a variable suppression matches a variable denoted by its name.
bool suppression_matches_soname_or_filename(const string &soname, const string &filename, const suppression_base &suppr)
Test if a given SONAME or file name is matched by a given suppression specification.
type_suppression_sptr is_type_suppression(suppression_sptr suppr)
Test if an instance of suppression is an instance of type_suppression.
bool check_sufficient_props(const char *const *names, size_t count, const ini::config::section §ion)
Check if a section has at least one of the given properties.
bool suppression_matches_type_name_or_location(const type_suppression &s, const string &type_name, const location &type_location)
Test if a type suppression matches a type name and location.
bool suppression_matches_type_location(const type_suppression &s, const location &loc)
Test if a type suppression matches a source location.
bool is_data_member_offset_in_range(const var_decl_sptr &dm, const type_suppression::insertion_range_sptr &range, const class_or_union *context)
Test if a data memer offset is in a given insertion range.
bool is_function_suppressed(const fe_iface &fe, const string &fn_name, const string &fn_linkage_name, bool require_drop_property)
Test if a function is matched by at least one suppression specification associated with a given front...
bool suppression_matches_soname(const string &soname, const suppression_base &suppr)
Test if a given SONAME is matched by a given suppression specification.
bool is_type_suppressed(const fe_iface &fe, const string &type_name, const location &type_location, bool &type_is_opaque, bool require_drop_property)
Test if a type is matched by at least one suppression specification associated with a given front-end...
shared_ptr< suppression_base > suppression_sptr
Convenience typedef for a shared pointer to a suppression.
bool is_negated_suppression(const suppression_base &s)
Test if a suppression specification is a negated suppression.
bool suppression_matches_variable_sym_name(const suppr::variable_suppression &s, const string &var_linkage_name)
Test if a variable suppression matches a variable denoted by its symbol name.
file_suppression_sptr file_is_suppressed(const string &file_path, const suppressions_type &sprs)
Test if a given file path is "suppressed" by at least one file suppression specification among a vect...
bool is_variable_suppressed(const fe_iface &fe, const string &var_name, const string &var_linkage_name, bool require_drop_property)
Test if a variable is matched by at least one suppression specification associated with a given front...
Toplevel namespace for libabigail.
The type of the private data of the function_suppression type.
The type of the private data of the variable_suppression type.