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_;}
133{priv_->drops_artifact_ = f;}
144{
return priv_->is_artificial_;}
154{priv_->is_artificial_ = f;}
161{
return priv_->label_;}
168{priv_->label_ = label;}
180{priv_->file_name_regex_str_ = regexp;}
192{
return priv_->file_name_regex_str_;}
205{priv_->file_name_not_regex_str_ = regexp;}
218{
return priv_->file_name_not_regex_str_;}
242{priv_->soname_regex_str_ = regexp;}
254{
return priv_->soname_regex_str_;}
267{priv_->soname_not_regex_str_ = regexp;}
280{
return priv_->soname_not_regex_str_;}
350 result = dynamic_pointer_cast<negated_suppression_base>(s);
371 string first_soname = ctxt.
get_corpus_diff()->first_corpus()->get_soname(),
377 if (!suppr.priv_->matches_soname(first_soname)
378 && !suppr.priv_->matches_soname(second_soname))
397names_of_binaries_match(
const suppression_base& suppr,
398 const diff_context &ctxt)
401 string first_binary_path = ctxt.get_corpus_diff()->first_corpus()->get_path(),
402 second_binary_path = ctxt.get_corpus_diff()->second_corpus()->get_path();
404 if (!suppr.has_file_name_related_property())
407 if (!suppr.priv_->matches_binary_name(first_binary_path)
408 && !suppr.priv_->matches_binary_name(second_binary_path))
414suppression_base::~suppression_base()
418read_type_suppression(
const ini::config::section& section);
421read_function_suppression(
const ini::config::section& section);
424read_variable_suppression(
const ini::config::section& section);
427read_file_suppression(
const ini::config::section& section);
440read_suppressions(
const ini::config& config,
444 for (ini::config::sections_type::const_iterator i =
445 config.get_sections().begin();
446 i != config.get_sections().end();
448 if ((s = read_type_suppression(**i))
449 || (s = read_function_suppression(**i))
450 || (s = read_variable_suppression(**i))
451 || (s = read_file_suppression(**i)))
452 suppressions.push_back(s);
463read_suppressions(std::istream& input,
467 read_suppressions(*
config, suppressions);
477read_suppressions(
const string& file_path,
481 read_suppressions(*
config, suppressions);
503type_suppression::type_suppression(
const string& label,
504 const string& type_name_regexp,
505 const string& type_name)
507 priv_(new
priv(type_name_regexp,
515type_suppression::~type_suppression()
527{priv_->type_name_regex_str_ = name_regex_str;}
538{
return priv_->type_name_regex_str_;}
549{priv_->set_type_name_not_regex_str(r);}
560{
return priv_->get_type_name_not_regex_str();}
568{priv_->type_name_ = name;}
576{
return priv_->type_name_;}
584{
return priv_->consider_type_kind_;}
592{priv_->consider_type_kind_ = f;}
603{priv_->type_kind_ = k;}
614{
return priv_->type_kind_;}
623{
return priv_->consider_reach_kind_;}
633{priv_->consider_reach_kind_ = f;}
642{
return priv_->reach_kind_;}
651{priv_->reach_kind_ = k;}
658{
return priv_->has_size_change_;}
665{priv_->has_size_change_ = flag;}
671const unordered_set<string>&
673{
return priv_->potential_data_members_;}
681(
const string_set_type& s)
const
682{priv_->potential_data_members_ = s;}
689{
return priv_->potential_data_members_regex_str_;}
696(
const string& d)
const
697{priv_->potential_data_members_regex_str_ = d;}
706{priv_->insertion_ranges_ = r;}
715{
return priv_->insertion_ranges_;}
724{
return priv_->insertion_ranges_;}
731const unordered_set<string>&
733{
return priv_->source_locations_to_keep_;}
740unordered_set<string>&
742{
return priv_->source_locations_to_keep_;}
750(
const unordered_set<string>& l)
751{priv_->source_locations_to_keep_ = l;}
759{
return priv_->source_location_to_keep_regex_str_;}
767{priv_->source_location_to_keep_regex_str_ = r;}
777{
return priv_->changed_enumerator_names_;}
787{priv_->changed_enumerator_names_ = n;}
796const vector<regex::regex_t_sptr>&
798{
return priv_->changed_enumerators_regexp_;}
809{priv_->changed_enumerators_regexp_ = n;}
816{
return priv_->has_strict_fam_conv_;}
824{priv_->has_strict_fam_conv_ = f;}
854 if (comparison::filtering::has_virtual_mem_fn_change(d))
875 d =
is_type_diff(ptr_diff->underlying_type_diff().get());
888 d =
is_type_diff(ref_diff->underlying_type_diff().get());
901 d =
is_type_diff(ptr_diff->underlying_type_diff().get());
907 d =
is_type_diff(ref_diff->underlying_type_diff().get());
916 type_base_sptr ft, st;
957 if (!f->find_data_member(var_name))
964 priv_->get_potential_data_member_names_regex())
966 bool data_member_matched =
false;
969 if (
regex::match(data_member_name_regex, dm->get_name()))
971 data_member_matched =
true;
975 if (!data_member_matched)
1015 decl_base_sptr member = m.second;
1016 bool matched =
false;
1033 bool matched =
false;
1057 == second_class->get_size_in_bits())))
1069 && (enum_dif->
first_enum()->get_size_in_bits()
1080 bool matched =
true;
1081 for (string_changed_enumerator_map::const_iterator i =
1125 if (!names_of_binaries_match(*
this, *ctxt))
1130 if (!sonames_of_binaries_match(*
this, *ctxt))
1151 const type_base_sptr &type)
1158 bool matches =
true;
1161 case type_suppression::UNKNOWN_TYPE_KIND:
1162 case type_suppression::CLASS_TYPE_KIND:
1166 case type_suppression::STRUCT_TYPE_KIND:
1169 if (!klass || !klass->is_struct())
1173 case type_suppression::UNION_TYPE_KIND:
1177 case type_suppression::ENUM_TYPE_KIND:
1181 case type_suppression::ARRAY_TYPE_KIND:
1185 case type_suppression::TYPEDEF_TYPE_KIND:
1189 case type_suppression::BUILTIN_TYPE_KIND:
1216 const string& type_name)
1219 || s.priv_->get_type_name_regex()
1220 || s.priv_->get_type_name_not_regex())
1236 s.priv_->get_type_name_regex())
1243 s.priv_->get_type_name_not_regex())
1267 const type_base_sptr& type)
1287 string loc_path, loc_path_base;
1288 unsigned loc_line = 0, loc_column = 0;
1289 loc.
expand(loc_path, loc_line, loc_column);
1291 if (
regex_t_sptr regexp = s.priv_->get_source_location_to_keep_regex())
1306 || s.priv_->get_source_location_to_keep_regex())
1326 const type_base_sptr& type)
1344 if (cl->get_is_declaration_only())
1348 ABG_ASSERT(!cl->get_definition_of_declaration());
1357 || s.priv_->get_source_location_to_keep_regex())
1380 const string& type_name,
1400 if (!suppression_matches_type_no_name(*
this, type))
1422 if (!suppression_matches_type_no_name(*
this, type))
1432struct type_suppression::insertion_range::priv
1461 : priv_(new priv(begin, end))
1471{
return priv_->begin_;}
1480{
return priv_->end_;}
1569 value = b->as_integer();
1576 && (fn_call->get_name() ==
"offset_of"
1577 || fn_call->get_name() ==
"offset_after"
1578 || fn_call->get_name() ==
"offset_of_first_data_member_regexp"
1579 || fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1580 && fn_call->get_arguments().size() == 1)
1582 if (fn_call->get_name() ==
"offset_of"
1583 || fn_call->get_name() ==
"offset_after")
1585 string member_name = fn_call->get_arguments()[0];
1586 for (class_decl::data_members::const_iterator it =
1593 if ((*it)->get_name() == member_name)
1595 if (fn_call->get_name() ==
"offset_of")
1597 else if (fn_call->get_name() ==
"offset_after")
1602 (*it)->get_type()->get_size_in_bits();
1612 else if (fn_call->get_name() ==
"offset_of_first_data_member_regexp"
1613 || fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1615 string name_regexp = fn_call->get_arguments()[0];
1619 if (fn_call->get_name() ==
"offset_of_first_data_member_regexp")
1621 else if (fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1634 if (b->get_name() == OFFSET_OF_FLEXIBLE_ARRAY_DATA_MEMBER_STRING())
1644 else if (b->get_name() == END_STRING())
1649 value = std::numeric_limits<uint64_t>::max();
1666 return value == std::numeric_limits<uint64_t>::max();
1679{
return dynamic_pointer_cast<type_suppression::insertion_range::integer_boundary>(b);}
1693{
return dynamic_pointer_cast<type_suppression::insertion_range::fn_call_expr_boundary>(b);}
1705{
return dynamic_pointer_cast<type_suppression::insertion_range::named_boundary>(b);}
1709struct type_suppression::insertion_range::boundary::priv
1727struct type_suppression::insertion_range::integer_boundary::priv
1735 priv(uint64_t value)
1744type_suppression::insertion_range::integer_boundary::integer_boundary(uint64_t value)
1745 : priv_(new priv(value))
1754{
return priv_->value_;}
1759type_suppression::insertion_range::integer_boundary::operator uint64_t()
const
1760{
return as_integer();}
1768struct type_suppression::insertion_range::fn_call_expr_boundary::priv
1785type_suppression::insertion_range::fn_call_expr_boundary::
1787 : priv_(new priv(expr))
1795{
return priv_->expr_;}
1801{
return as_function_call_expr();}
1810struct type_suppression::insertion_range::named_boundary::priv
1817 priv(
const string& name)
1826type_suppression::insertion_range::named_boundary::named_boundary(
const string& name)
1827 : priv_(new priv(name))
1835{
return priv_->name_;}
1847{
return dynamic_pointer_cast<type_suppression>(suppr);}
1870 const string& type_name_regexp,
1871 const string& type_name)
1905read_type_kind_string(
const string& input)
1907 if (input ==
"class")
1908 return type_suppression::CLASS_TYPE_KIND;
1909 else if (input ==
"struct")
1910 return type_suppression::STRUCT_TYPE_KIND;
1911 else if (input ==
"union")
1912 return type_suppression::UNION_TYPE_KIND;
1913 else if (input ==
"enum")
1914 return type_suppression::ENUM_TYPE_KIND;
1915 else if (input ==
"array")
1916 return type_suppression::ARRAY_TYPE_KIND;
1917 else if (input ==
"typedef")
1918 return type_suppression::TYPEDEF_TYPE_KIND;
1919 else if (input ==
"builtin")
1920 return type_suppression::BUILTIN_TYPE_KIND;
1922 return type_suppression::UNKNOWN_TYPE_KIND;
1933read_suppression_reach_kind(
const string& input)
1935 if (input ==
"direct")
1937 else if (input ==
"pointer")
1939 else if (input ==
"reference")
1941 else if (input ==
"reference-or-pointer")
1955read_type_suppression(
const ini::config::section& section)
1959 if (section.get_name() !=
"suppress_type"
1960 && section.get_name() !=
"allow_type")
1963 static const char *
const sufficient_props[] = {
1965 "file_name_not_regexp",
1967 "soname_not_regexp",
1972 "source_location_not_in",
1973 "source_location_not_regexp",
1976 sizeof(sufficient_props)/
sizeof(
char*),
1985 string drop_artifact_str = drop_artifact
1986 ? drop_artifact->get_value()->as_string()
1992 string has_size_change_str = has_size_change
1993 ? has_size_change->get_value()->as_string()
1998 string label_str = label ? label->get_value()->as_string() :
"";
2002 string file_name_regex_str =
2003 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
2007 string file_name_not_regex_str =
2008 file_name_not_regex_prop
2009 ? file_name_not_regex_prop->get_value()->as_string()
2014 string soname_regex_str =
2015 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
2019 string soname_not_regex_str =
2020 soname_not_regex_prop
2021 ? soname_not_regex_prop->get_value()->as_string()
2026 string name_regex_str = name_regex_prop
2027 ? name_regex_prop->get_value()->as_string()
2032 string name_not_regex_str = name_not_regex_prop
2033 ? name_not_regex_prop->get_value()->as_string()
2038 string name_str = name_prop
2039 ? name_prop->get_value()->as_string()
2043 section.find_property(
"source_location_not_in");
2044 unordered_set<string> srcloc_not_in;
2045 if (srcloc_not_in_prop)
2048 srcloc_not_in.insert(p->get_value()->as_string());
2055 vector<string>::const_iterator i;
2056 for (i = list_property->get_value()->get_content().begin();
2057 i != list_property->get_value()->get_content().end();
2059 srcloc_not_in.insert(*i);
2066 string srcloc_not_regexp_str;
2067 if (srcloc_not_regexp_prop)
2068 srcloc_not_regexp_str = srcloc_not_regexp_prop->get_value()->as_string();
2070 bool consider_type_kind =
false;
2075 consider_type_kind =
true;
2077 read_type_kind_string(type_kind_prop->get_value()->as_string());
2080 bool consider_reach_kind =
false;
2085 consider_reach_kind =
true;
2087 read_suppression_reach_kind(reach_kind_prop->get_value()->as_string());
2091 string_set_type potential_data_member_names;
2100 tv = prop->get_value();
2103 sv = prop->get_value();
2108 && tv->get_value_items().size() == 1
2121 potential_data_member_names.insert(name);
2124 for (
const string& name : val->get_content())
2125 potential_data_member_names.insert(name);
2129 string name = sv->as_string();
2130 potential_data_member_names.insert(name);
2135 string potential_data_member_names_regexp_str;
2138 potential_data_member_names_regexp_str = prop->get_value()->as_string();
2141 vector<type_suppression::insertion_range_sptr> insert_ranges;
2142 bool consider_data_member_insertion =
false;
2148 string ins_point = prop->get_value()->as_string();
2150 if (ins_point == END_STRING())
2152 else if (ins_point == OFFSET_OF_FLEXIBLE_ARRAY_DATA_MEMBER_STRING())
2154 else if (isdigit(ins_point[0]))
2156 (atoi(ins_point.c_str()));
2165 (
new type_suppression::insertion_range(begin, end));
2166 insert_ranges.push_back(insert_range);
2167 consider_data_member_insertion =
true;
2173 (
"has_data_member_inserted_between")))
2186 && v->get_value_items().size() == 1
2193 string str = val->get_content()[0];
2197 else if (isdigit(str[0]))
2199 (atoi(str.c_str()));
2206 str = val->get_content()[1];
2210 else if (isdigit(str[0]))
2212 (atoi(str.c_str()));
2220 (
new type_suppression::insertion_range(begin, end));
2221 insert_ranges.push_back(insert_range);
2222 consider_data_member_insertion =
true;
2241 (
"has_data_members_inserted_between")))
2243 bool is_well_formed =
true;
2244 for (vector<ini::property_value_sptr>::const_iterator i =
2245 prop->get_value()->get_value_items().begin();
2246 is_well_formed && i != prop->get_value()->get_value_items().end();
2252 || tuple_value->get_value_items().size() != 1
2255 is_well_formed =
false;
2260 if (list_value->get_content().size() != 2)
2262 is_well_formed =
false;
2267 string str = list_value->get_content()[0];
2271 else if (isdigit(str[0]))
2274 (atoi(str.c_str()));
2281 str = list_value->get_content()[1];
2285 else if (isdigit(str[0]))
2287 (atoi(str.c_str()));
2295 (
new type_suppression::insertion_range(begin, end));
2296 insert_ranges.push_back(insert_range);
2297 consider_data_member_insertion =
true;
2299 if (!is_well_formed)
2313 section.find_property(
"changed_enumerators");
2315 vector<string> changed_enumerator_names;
2316 if (changed_enumerators_prop)
2320 changed_enumerator_names =
2321 p->get_value()->get_content();
2324 changed_enumerator_names.push_back(p->get_value()->as_string());
2335 section.find_property(
"changed_enumerators_regexp");
2337 vector<regex_t_sptr> changed_enumerators_regexp;
2338 if (changed_enumerators_regexp_prop)
2343 for (
string e : p->get_value()->get_content())
2349 changed_enumerators_regexp.push_back(
2358 (section.find_property(
"has_strict_flexible_array_data_member_conversion"));
2359 string has_strict_fam_conv_str = has_strict_fam_conv
2360 ? has_strict_fam_conv->get_value()->as_string()
2363 if (section.get_name() ==
"suppress_type")
2364 result.reset(
new type_suppression(label_str, name_regex_str, name_str));
2365 else if (section.get_name() ==
"allow_type")
2366 result.reset(
new negated_type_suppression(label_str, name_regex_str,
2369 if (consider_type_kind)
2371 result->set_consider_type_kind(
true);
2372 result->set_type_kind(type_kind);
2375 if (consider_reach_kind)
2377 result->set_consider_reach_kind(
true);
2378 result->set_reach_kind(reach_kind);
2381 if (!potential_data_member_names.empty())
2382 result->set_potential_data_member_names(potential_data_member_names);
2384 if (!potential_data_member_names_regexp_str.empty())
2385 result->set_potential_data_member_names_regex_str
2386 (potential_data_member_names_regexp_str);
2388 if (consider_data_member_insertion)
2389 result->set_data_member_insertion_ranges(insert_ranges);
2391 if (!name_not_regex_str.empty())
2392 result->set_type_name_not_regex_str(name_not_regex_str);
2394 if (!file_name_regex_str.empty())
2395 result->set_file_name_regex_str(file_name_regex_str);
2397 if (!file_name_not_regex_str.empty())
2398 result->set_file_name_not_regex_str(file_name_not_regex_str);
2400 if (!soname_regex_str.empty())
2401 result->set_soname_regex_str(soname_regex_str);
2403 if (!soname_not_regex_str.empty())
2404 result->set_soname_not_regex_str(soname_not_regex_str);
2406 if (!srcloc_not_in.empty())
2407 result->set_source_locations_to_keep(srcloc_not_in);
2409 if (!srcloc_not_regexp_str.empty())
2410 result->set_source_location_to_keep_regex_str(srcloc_not_regexp_str);
2412 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
2413 && ((!name_regex_str.empty()
2414 || !name_str.empty()
2415 || !srcloc_not_regexp_str.empty()
2416 || !srcloc_not_in.empty())))
2417 result->set_drops_artifact_from_ir(
true);
2419 if (has_size_change_str ==
"yes" || has_size_change_str ==
"true")
2420 result->set_has_size_change(
true);
2422 if (result->get_type_kind() == type_suppression::ENUM_TYPE_KIND
2423 && !changed_enumerator_names.empty())
2424 result->set_changed_enumerator_names(changed_enumerator_names);
2426 if (result->get_type_kind() == type_suppression::ENUM_TYPE_KIND
2427 && !changed_enumerators_regexp.empty())
2428 result->set_changed_enumerators_regexp(changed_enumerators_regexp);
2430 if (has_strict_fam_conv_str ==
"yes" || has_strict_fam_conv_str ==
"true")
2431 result->set_has_strict_fam_conversion(
true);
2449function_suppression::parameter_spec::parameter_spec(
size_t i,
2451 const string& tn_regex)
2452 : priv_(new
priv(i, tn, tn_regex))
2462{
return priv_->index_;}
2477{
return priv_->type_name_;}
2485{priv_->type_name_ = tn;}
2498{
return priv_->type_name_regex_str_;}
2512(
const string& type_name_regex_str)
2513{priv_->type_name_regex_str_ = type_name_regex_str;}
2582 const string& ret_tn,
2583 const string& ret_tr,
2585 const string& sym_n,
2586 const string& sym_nr,
2587 const string& sym_v,
2588 const string& sym_vr)
2590 priv_(new
priv(name, nr, ret_tn, ret_tr, ps,
2591 sym_n, sym_nr, sym_v, sym_vr))
2594function_suppression::~function_suppression()
2607 if (s ==
"function-subtype-change")
2609 else if (s ==
"added-function")
2611 else if (s ==
"deleted-function")
2613 else if (s ==
"all")
2616 return UNDEFINED_CHANGE_KIND;
2624{
return priv_->change_kind_;}
2631{priv_->change_kind_ = k;}
2640{
return priv_->name_;}
2658{
return priv_->name_regex_str_;}
2667{priv_->name_regex_str_ = r;}
2677{
return priv_->name_not_regex_str_;}
2687{priv_->name_not_regex_str_ = r;}
2696{
return priv_->return_type_name_;}
2705{priv_->return_type_name_ = tr;}
2721{
return priv_->return_type_regex_str_;}
2737{priv_->return_type_regex_str_ = r;}
2749{
return priv_->parm_specs_;}
2762{priv_->parm_specs_ = p;}
2769{priv_->parm_specs_.push_back(p);}
2780{
return priv_->symbol_name_;}
2791{priv_->symbol_name_ = n;}
2807{
return priv_->symbol_name_regex_str_;}
2823{priv_->symbol_name_regex_str_ = r;}
2842{
return priv_->symbol_name_not_regex_str_;}
2862{priv_->symbol_name_not_regex_str_ = r;}
2873{
return priv_->symbol_version_;}
2884{priv_->symbol_version_ = v;}
2899{
return priv_->symbol_version_regex_str_;}
2914{priv_->symbol_version_regex_str_ = r;}
2922{
return priv_->allow_other_aliases_;}
2930{priv_->allow_other_aliases_ = f;}
2984 if (!names_of_binaries_match(*
this, *ctxt))
2989 if (!sonames_of_binaries_match(*
this, *ctxt))
3004 && fn->
get_symbol()->get_alias_from_name(fname))
3014 symbol_name = sym->get_name();
3015 if (sym->has_aliases() && sym->get_alias_from_name(fname))
3018 a && !a->is_main_symbol();
3019 a = a->get_next_alias())
3020 if (a->get_name() != symbol_name)
3030 const regex_t_sptr name_regex = priv_->get_name_regex();
3038 && fn->
get_symbol()->get_alias_from_name(fname))
3048 symbol_name = sym->get_name();
3049 if (sym->has_aliases())
3052 a && !a->is_main_symbol();
3053 a = a->get_next_alias())
3061 const regex_t_sptr name_not_regex = priv_->get_name_not_regex();
3069 && fn->
get_symbol()->get_alias_from_name(fname))
3079 symbol_name = sym->get_name();
3080 if (sym->has_aliases())
3083 a && !a->is_main_symbol();
3084 a = a->get_next_alias())
3094 string fn_return_type_name = fn->
get_type()->get_return_type()
3095 ?
static_cast<string>
3107 const regex_t_sptr return_type_regex = priv_->get_return_type_regex();
3108 if (return_type_regex
3109 && !
regex::match(return_type_regex, fn_return_type_name))
3115 string fn_sym_name, fn_sym_version;
3119 fn_sym_name = sym->get_name();
3120 fn_sym_version = sym->get_version().str();
3133 if (sym->has_aliases())
3136 a && !a->is_main_symbol();
3137 a = a->get_next_alias())
3138 if (a->get_name() != fn_sym_name)
3145 const regex_t_sptr symbol_name_regex = priv_->get_symbol_name_regex();
3146 if (symbol_name_regex && !
regex::match(symbol_name_regex, fn_sym_name))
3150 priv_->get_symbol_name_not_regex();
3151 if (symbol_name_not_regex
3160 if (sym->has_aliases())
3163 a && !a->is_main_symbol();
3164 a = a->get_next_alias())
3166 if (symbol_name_regex
3170 if (symbol_name_not_regex
3188 priv_->get_symbol_version_regex();
3189 if (symbol_version_regex
3190 && !
regex::match(symbol_version_regex, fn_sym_version))
3198 type_base_sptr parm_type;
3200 for (parameter_specs_type::const_iterator p =
3205 size_t index = (*p)->get_index();
3207 fn_type->get_parm_at_index_from_first_non_implicit_parm(index);
3211 string fn_parm_type_qualified_name;
3214 parm_type = fn_parm->get_type();
3215 fn_parm_type_qualified_name =
3219 const string& tn = (*p)->get_parameter_type_name();
3222 if (tn != fn_parm_type_qualified_name)
3228 (*p)->priv_->get_type_name_regex();
3229 if (parm_type_name_regex)
3232 fn_parm_type_qualified_name))
3297 if (!names_of_binaries_match(*
this, *ctxt))
3303 if (!sonames_of_binaries_match(*
this, *ctxt))
3309 bool no_symbol_name =
false, no_symbol_version =
false;
3319 const regex_t_sptr symbol_name_regex = priv_->get_symbol_name_regex();
3320 if (symbol_name_regex && !
regex::match(symbol_name_regex, sym_name))
3324 no_symbol_name =
true;
3335 priv_->get_symbol_version_regex();
3336 if (symbol_version_regex
3341 no_symbol_version =
true;
3343 if (no_symbol_name && no_symbol_version)
3378{
return dynamic_pointer_cast<function_suppression>(suppr);}
3393 (
static_cast<unsigned>(l) &
static_cast<unsigned>(r));
3409 (
static_cast<unsigned>(l) |
static_cast<unsigned>(r));
3422 const string& var_name)
3429 else if (
regex_t_sptr regexp = s.priv_->get_name_not_regex())
3434 else if (s.priv_->name_.empty())
3438 if (s.priv_->name_ != var_name)
3456 const string& var_linkage_name)
3458 if (
regex_t_sptr regexp = s.priv_->get_symbol_name_regex())
3464 s.priv_->get_symbol_name_not_regex())
3469 else if (s.priv_->symbol_name_.empty())
3473 if (s.priv_->symbol_name_ != var_linkage_name)
3491 const string& type_name)
3493 if (
regex_t_sptr regexp = s.priv_->get_type_name_regex())
3517read_parameter_spec_from_string(
const string& str)
3519 string::size_type cur = 0;
3523 for (; cur < str.size(); ++cur)
3524 if (!isspace(str[cur]))
3529 if (str[cur] ==
'\'')
3532 for (; cur < str.size(); ++cur)
3533 if (!isdigit(str[cur]))
3536 index_str += str[cur];
3540 for (; cur < str.size(); ++cur)
3541 if (!isspace(str[cur]))
3544 bool is_regex =
false;
3545 if (str[cur] ==
'/')
3553 for (; cur < str.size(); ++cur)
3554 if (!isspace(str[cur]))
3556 if (is_regex && str[cur] ==
'/')
3558 type_name += str[cur];
3561 if (is_regex && str[cur] ==
'/')
3564 if (!index_str.empty() || !type_name.empty())
3566 std::string type_name_regex;
3569 type_name_regex = type_name;
3572 function_suppression::parameter_spec* p =
3573 new function_suppression::parameter_spec(atoi(index_str.c_str()),
3574 type_name, type_name_regex);
3589read_function_suppression(
const ini::config::section& section)
3593 if (section.get_name() !=
"suppress_function")
3596 static const char *
const sufficient_props[] = {
3599 "file_name_not_regexp",
3601 "soname_not_regexp",
3607 "return_type_regexp",
3609 "symbol_name_regexp",
3610 "symbol_name_not_regexp",
3612 "symbol_version_regexp",
3615 sizeof(sufficient_props)/
sizeof(
char*),
3624 string drop_artifact_str = drop_artifact
3625 ? drop_artifact->get_value()->as_string()
3630 string change_kind_str = change_kind_prop
3631 ? change_kind_prop->get_value()->as_string()
3636 string label_str = label_prop
3637 ? label_prop->get_value()->as_string()
3642 string file_name_regex_str =
3643 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
3647 string file_name_not_regex_str =
3648 file_name_not_regex_prop
3649 ? file_name_not_regex_prop->get_value()->as_string()
3654 string soname_regex_str =
3655 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
3659 string soname_not_regex_str =
3660 soname_not_regex_prop
3661 ? soname_not_regex_prop->get_value()->as_string()
3666 string name = name_prop
3667 ? name_prop->get_value()->as_string()
3672 string name_regex_str = name_regex_prop
3673 ? name_regex_prop->get_value()->as_string()
3678 string name_not_regex_str = name_not_regex_prop
3679 ? name_not_regex_prop->get_value()->as_string()
3684 string return_type_name = return_type_name_prop
3685 ? return_type_name_prop->get_value()->as_string()
3690 string return_type_regex_str = return_type_regex_prop
3691 ? return_type_regex_prop->get_value()->as_string()
3696 string sym_name = sym_name_prop
3697 ? sym_name_prop->get_value()->as_string()
3702 string sym_name_regex_str = sym_name_regex_prop
3703 ? sym_name_regex_prop->get_value()->as_string()
3708 string sym_name_not_regex_str = sym_name_not_regex_prop
3709 ? sym_name_not_regex_prop->get_value()->as_string()
3714 string sym_version = sym_ver_prop
3715 ? sym_ver_prop->get_value()->as_string()
3720 string sym_ver_regex_str = sym_ver_regex_prop
3721 ? sym_ver_regex_prop->get_value()->as_string()
3726 string allow_other_aliases = allow_other_aliases_prop
3727 ? allow_other_aliases_prop->get_value()->as_string()
3732 for (ini::config::properties_type::const_iterator p =
3733 section.get_properties().begin();
3734 p != section.get_properties().end();
3736 if ((*p)->get_name() ==
"parameter")
3740 if ((parm = read_parameter_spec_from_string
3741 (prop->get_value()->as_string())))
3742 parms.push_back(parm);
3745 result.reset(
new function_suppression(label_str,
3749 return_type_regex_str,
3754 sym_ver_regex_str));
3756 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
3758 || !name_regex_str.empty()
3759 || !name_not_regex_str.empty()
3760 || !sym_name.empty()
3761 || !sym_name_regex_str.empty()
3762 || !sym_name_not_regex_str.empty()))
3763 result->set_drops_artifact_from_ir(
true);
3765 if (!change_kind_str.empty())
3766 result->set_change_kind
3769 if (!allow_other_aliases.empty())
3770 result->set_allow_other_aliases(allow_other_aliases ==
"yes"
3771 || allow_other_aliases ==
"true");
3773 if (!name_not_regex_str.empty())
3774 result->set_name_not_regex_str(name_not_regex_str);
3776 if (!sym_name_not_regex_str.empty())
3777 result->set_symbol_name_not_regex_str(sym_name_not_regex_str);
3779 if (!file_name_regex_str.empty())
3780 result->set_file_name_regex_str(file_name_regex_str);
3782 if (!file_name_not_regex_str.empty())
3783 result->set_file_name_not_regex_str(file_name_not_regex_str);
3785 if (!soname_regex_str.empty())
3786 result->set_soname_regex_str(soname_regex_str);
3788 if (!soname_not_regex_str.empty())
3789 result->set_soname_not_regex_str(soname_not_regex_str);
3851 const string& name_regex_str,
3852 const string& symbol_name,
3853 const string& symbol_name_regex_str,
3854 const string& symbol_version,
3855 const string& symbol_version_regex,
3856 const string& type_name,
3857 const string& type_name_regex_str)
3859 priv_(new
priv(name, name_regex_str,
3860 symbol_name, symbol_name_regex_str,
3861 symbol_version, symbol_version_regex,
3862 type_name, type_name_regex_str))
3880 if (s ==
"variable-subtype-change")
3882 else if (s ==
"added-variable")
3884 else if (s ==
"deleted-variable")
3886 else if (s ==
"all")
3889 return UNDEFINED_CHANGE_KIND;
3897{
return priv_->change_kind_;}
3904{priv_->change_kind_ = k;}
3913{
return priv_->name_;}
3934{
return priv_->name_regex_str_;}
3946{priv_->name_regex_str_ = r;}
3953{
return priv_->name_not_regex_str_;}
3960{priv_->name_not_regex_str_ = r;}
3971{
return priv_->symbol_name_;}
3982{priv_->symbol_name_ = n;}
3995{
return priv_->symbol_name_regex_str_;}
4008{priv_->symbol_name_regex_str_ = r;}
4027{
return priv_->symbol_name_not_regex_str_;}
4047{priv_->symbol_name_not_regex_str_ = r;}
4056{
return priv_->symbol_version_;}
4065{priv_->symbol_version_ = v;}
4077{
return priv_->symbol_version_regex_str_;}
4089{priv_->symbol_version_regex_str_ = r;}
4100{
return priv_->type_name_;}
4111{priv_->type_name_ = n;}
4124{
return priv_->type_name_regex_str_;}
4137{priv_->type_name_regex_str_ = r;}
4192 if (!names_of_binaries_match(*
this, *ctxt))
4198 if (!sonames_of_binaries_match(*
this, *ctxt))
4217 const regex_t_sptr name_regex = priv_->get_name_regex();
4221 const regex_t_sptr name_not_regex = priv_->get_name_not_regex();
4222 if (name_not_regex &&
regex::match(name_not_regex, var_name))
4237 const regex_t_sptr sym_name_regex = priv_->get_symbol_name_regex();
4238 if (sym_name_regex && !
regex::match(sym_name_regex, var_sym_name))
4242 priv_->get_symbol_name_not_regex();
4243 if (sym_name_not_regex &&
regex::match(sym_name_not_regex, var_sym_name))
4248 string var_sym_version =
4258 priv_->get_symbol_version_regex();
4259 if (symbol_version_regex
4260 && !
regex::match(symbol_version_regex, var_sym_version))
4265 string var_type_name =
4277 const regex_t_sptr type_name_regex = priv_->get_type_name_regex();
4278 if (type_name_regex && !
regex::match(type_name_regex, var_type_name))
4341 if (!names_of_binaries_match(*
this, *ctxt))
4346 if (!sonames_of_binaries_match(*
this, *ctxt))
4353 bool no_symbol_name =
false, no_symbol_version =
false;
4368 const regex_t_sptr sym_name_regex = priv_->get_symbol_name_regex();
4369 if (sym_name_regex && !
regex::match(sym_name_regex, sym_name))
4373 no_symbol_name =
true;
4384 priv_->get_symbol_version_regex();
4385 if (symbol_version_regex
4390 no_symbol_version =
true;
4392 if (no_symbol_name && no_symbol_version)
4427{
return dynamic_pointer_cast<variable_suppression>(s);}
4442 (
static_cast<unsigned>(l) &
static_cast<unsigned>(r));
4458 (
static_cast<unsigned>(l) |
static_cast<unsigned>(r));
4473 if (section.
get_name() !=
"suppress_variable")
4476 static const char *
const sufficient_props[] = {
4479 "file_name_not_regexp",
4481 "soname_not_regexp",
4486 "symbol_name_regexp",
4487 "symbol_name_not_regexp",
4489 "symbol_version_regexp",
4494 sizeof(sufficient_props)/
sizeof(
char*),
4503 string drop_artifact_str = drop_artifact
4504 ? drop_artifact->get_value()->as_string()
4509 string change_kind_str = change_kind_prop
4510 ? change_kind_prop->get_value()->as_string()
4515 string label_str = (label_prop
4516 ? label_prop->get_value()->as_string()
4521 string file_name_regex_str =
4522 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
4526 string file_name_not_regex_str =
4527 file_name_not_regex_prop
4528 ? file_name_not_regex_prop->get_value()->as_string()
4533 string soname_regex_str =
4534 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
4538 string soname_not_regex_str =
4539 soname_not_regex_prop
4540 ? soname_not_regex_prop->get_value()->as_string()
4545 string name_str = (name_prop
4546 ? name_prop->get_value()->as_string()
4551 string name_regex_str = (name_regex_prop
4552 ? name_regex_prop->get_value()->as_string()
4557 string name_not_regex_str = name_not_regex_prop
4558 ? name_not_regex_prop->get_value()->as_string()
4563 string symbol_name = (sym_name_prop
4564 ? sym_name_prop->get_value()->as_string()
4569 string symbol_name_regex_str = sym_name_regex_prop
4570 ? sym_name_regex_prop->get_value()->as_string()
4575 string symbol_name_not_regex_str = sym_name_not_regex_prop
4576 ? sym_name_not_regex_prop->get_value()->as_string()
4581 string symbol_version = sym_version_prop
4582 ? sym_version_prop->get_value()->as_string()
4587 string symbol_version_regex_str = sym_version_regex_prop
4588 ? sym_version_regex_prop->get_value()->as_string()
4593 string type_name_str = type_name_prop
4594 ? type_name_prop->get_value()->as_string()
4599 string type_name_regex_str = type_name_regex_prop
4600 ? type_name_regex_prop->get_value()->as_string()
4603 result.reset(
new variable_suppression(label_str,
4607 symbol_name_regex_str,
4609 symbol_version_regex_str,
4611 type_name_regex_str));
4613 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
4614 && (!name_str.empty()
4615 || !name_regex_str.empty()
4616 || !name_not_regex_str.empty()
4617 || !symbol_name.empty()
4618 || !symbol_name_regex_str.empty()
4619 || !symbol_name_not_regex_str.empty()))
4620 result->set_drops_artifact_from_ir(
true);
4622 if (!name_not_regex_str.empty())
4623 result->set_name_not_regex_str(name_not_regex_str);
4625 if (!symbol_name_not_regex_str.empty())
4626 result->set_symbol_name_not_regex_str(symbol_name_not_regex_str);
4628 if (!change_kind_str.empty())
4629 result->set_change_kind
4632 if (!file_name_regex_str.empty())
4633 result->set_file_name_regex_str(file_name_regex_str);
4635 if (!file_name_not_regex_str.empty())
4636 result->set_file_name_not_regex_str(file_name_not_regex_str);
4638 if (!soname_regex_str.empty())
4639 result->set_soname_regex_str(soname_regex_str);
4641 if (!soname_not_regex_str.empty())
4642 result->set_soname_not_regex_str(soname_not_regex_str);
4665 const string& var_name,
4666 const string& var_linkage_name,
4667 bool require_drop_property)
4669 for (
auto i : supprs)
4672 if (require_drop_property && !i->get_drops_artifact_from_ir())
4674 if (!var_name.empty()
4677 if (!var_linkage_name.empty()
4701file_suppression::file_suppression(
const string& label,
4702 const string& fname_regex_str,
4703 const string& fname_not_regex_str)
4706 fname_not_regex_str)
4730 if (file_path.empty())
4736 bool has_regexp =
false;
4738 if (
regex_t_sptr regexp = suppression_base::priv_->get_file_name_regex())
4745 if (
regex_t_sptr regexp = suppression_base::priv_->get_file_name_not_regex())
4775 if (section.
get_name() !=
"suppress_file")
4778 static const char *
const sufficient_props[] = {
4780 "file_name_not_regexp",
4782 "soname_not_regexp",
4785 sizeof(sufficient_props)/
sizeof(
char*),
4791 string label_str = (label_prop
4792 ? label_prop->get_value()->as_string()
4797 string file_name_regex_str =
4798 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
4802 string file_name_not_regex_str =
4803 file_name_not_regex_prop
4804 ? file_name_not_regex_prop->get_value()->as_string()
4809 string soname_regex_str =
4810 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
4814 string soname_not_regex_str =
4815 soname_not_regex_prop
4816 ? soname_not_regex_prop->get_value()->as_string()
4820 file_name_regex_str,
4821 file_name_not_regex_str));
4823 if (!soname_regex_str.empty())
4825 result->set_soname_regex_str(soname_regex_str);
4826 result->set_drops_artifact_from_ir(
true);
4829 if (!soname_not_regex_str.empty())
4831 result->set_soname_not_regex_str(soname_not_regex_str);
4832 result->set_drops_artifact_from_ir(
true);
4848{
return dynamic_pointer_cast<file_suppression>(s);}
4865 for (suppressions_type::const_iterator i = sprs.begin(); i != sprs.end(); ++i)
4867 if (s->suppresses_file(file_path))
4886 return suppr.priv_->matches_soname(soname);
4902 const string& filename,
4906 || suppr.priv_->matches_binary_name(filename));
4915 static const char *OPAQUE_TYPES_SUPPR_SPEC_NAME =
4916 "libabigail::OPAQUE_TYPE_LABEL";
4918 return OPAQUE_TYPES_SUPPR_SPEC_NAME;
4963 if (!s.priv_->matches_soname(fe.
dt_soname()))
4970 if (!s.priv_->matches_binary_name(fe.
corpus_path()))
4994 const string& fn_name)
5009 else if (s.priv_->name_.empty())
5013 if (s.priv_->name_ != fn_name)
5033suppression_matches_function_sym_name(
const fe_iface& fe,
5035 const string& fn_linkage_name)
5050 else if (s.priv_->symbol_name_.empty())
5054 if (s.priv_->symbol_name_ != fn_linkage_name)
5075 const string& var_name)
5098 const string& var_linkage_name)
5123 const string& type_name,
5152 symbol->get_name());
5155 symbol->get_name());
5175 const string& sym_name,
5207 const string& fn_name,
5208 const string& fn_linkage_name,
5209 bool require_drop_property)
5214 if (require_drop_property && !i->get_drops_artifact_from_ir())
5216 if (!fn_name.empty()
5217 && suppression_matches_function_name(fe, *suppr, fn_name))
5219 if (!fn_linkage_name.empty()
5220 && suppression_matches_function_sym_name(fe, *suppr,
5247 const string& var_name,
5248 const string& var_linkage_name,
5249 bool require_drop_property)
5254 if (require_drop_property && !i->get_drops_artifact_from_ir())
5256 if (!var_name.empty()
5259 if (!var_linkage_name.empty()
5290 const string& type_name,
5292 bool& type_is_opaque,
5293 bool require_drop_property)
5298 if (require_drop_property && !i->get_drops_artifact_from_ir())
5305 type_is_opaque =
true;
5311 type_is_opaque =
false;
5334 uint64_t range_begin = 0, range_end = 0;
5345 if (range_begin > range_end)
5360 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.
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 current location into a tripplet file path, line and column number.
A declaration that introduces a scope.
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 type_base_sptr get_type() const
Getter of the type of the variable.
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(...
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...
vector< parameter_spec_sptr > parameter_specs_type
Convenience typedef for vector of parameter_spec_sptr.
change_kind get_change_kind() const
Getter of the "change-kind" property.
shared_ptr< parameter_spec > parameter_spec_sptr
Convenience typedef for shared_ptr of parameter_spec.
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.
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...
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.
const string get_label() const
Getter for the label associated to this suppression specification.
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_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.
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.
boundary_sptr end() const
Getter for the end of the range.
shared_ptr< fn_call_expr_boundary > fn_call_expr_boundary_sptr
Convenience typedef for a shared_ptr to a fn_call_expr_boundary.
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.
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.
boundary_sptr begin() const
Getter for the beginning of the range.
insertion_range()
Default Constructor of type_suppression::insertion_range.
shared_ptr< boundary > boundary_sptr
Convenience typedef for a shared_ptr to boundary.
shared_ptr< integer_boundary > integer_boundary_sptr
Convenience typedef for a shared_ptr to a integer_boundary.
shared_ptr< named_boundary > named_boundary_sptr
Convenience typedef for a shared_ptr to a named_boundary.
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.
vector< insertion_range_sptr > insertion_ranges
A convenience typedef for a vector of insertion_range_sptr.
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...
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.
shared_ptr< insertion_range > insertion_range_sptr
A convenience typedef for a shared pointer to insertion_range.
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.
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.
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.
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.
string build_qualified_name(const scope_decl *scope, const string &name)
Build and return a qualified name from a name and its scope.
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.