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_;}
352 result = dynamic_pointer_cast<negated_suppression_base>(s);
373 string first_soname = ctxt.
get_corpus_diff()->first_corpus()->get_soname(),
379 if (!suppr.priv_->matches_soname(first_soname)
380 && !suppr.priv_->matches_soname(second_soname))
399names_of_binaries_match(
const suppression_base& suppr,
400 const diff_context &ctxt)
403 string first_binary_path = ctxt.get_corpus_diff()->first_corpus()->get_path(),
404 second_binary_path = ctxt.get_corpus_diff()->second_corpus()->get_path();
406 if (!suppr.has_file_name_related_property())
409 if (!suppr.priv_->matches_binary_name(first_binary_path)
410 && !suppr.priv_->matches_binary_name(second_binary_path))
416suppression_base::~suppression_base()
420read_type_suppression(
const ini::config::section& section);
423read_function_suppression(
const ini::config::section& section);
426read_variable_suppression(
const ini::config::section& section);
429read_file_suppression(
const ini::config::section& section);
442read_suppressions(
const ini::config& config,
446 for (ini::config::sections_type::const_iterator i =
447 config.get_sections().begin();
448 i != config.get_sections().end();
450 if ((s = read_type_suppression(**i))
451 || (s = read_function_suppression(**i))
452 || (s = read_variable_suppression(**i))
453 || (s = read_file_suppression(**i)))
454 suppressions.push_back(s);
465read_suppressions(std::istream& input,
469 read_suppressions(*
config, suppressions);
479read_suppressions(
const string& file_path,
483 read_suppressions(*
config, suppressions);
505type_suppression::type_suppression(
const string& label,
506 const string& type_name_regexp,
507 const string& type_name)
509 priv_(new
priv(type_name_regexp,
517type_suppression::~type_suppression()
529{priv_->type_name_regex_str_ = name_regex_str;}
540{
return priv_->type_name_regex_str_;}
551{priv_->set_type_name_not_regex_str(r);}
562{
return priv_->get_type_name_not_regex_str();}
570{priv_->type_name_ = name;}
578{
return priv_->type_name_;}
586{
return priv_->consider_type_kind_;}
594{priv_->consider_type_kind_ = f;}
605{priv_->type_kind_ = k;}
616{
return priv_->type_kind_;}
625{
return priv_->consider_reach_kind_;}
635{priv_->consider_reach_kind_ = f;}
644{
return priv_->reach_kind_;}
653{priv_->reach_kind_ = k;}
660{
return priv_->has_size_change_;}
667{priv_->has_size_change_ = flag;}
673const unordered_set<string>&
675{
return priv_->potential_data_members_;}
683(
const string_set_type& s)
const
684{priv_->potential_data_members_ = s;}
691{
return priv_->potential_data_members_regex_str_;}
698(
const string& d)
const
699{priv_->potential_data_members_regex_str_ = d;}
708{priv_->insertion_ranges_ = r;}
717{
return priv_->insertion_ranges_;}
726{
return priv_->insertion_ranges_;}
733const unordered_set<string>&
735{
return priv_->source_locations_to_keep_;}
742unordered_set<string>&
744{
return priv_->source_locations_to_keep_;}
752(
const unordered_set<string>& l)
753{priv_->source_locations_to_keep_ = l;}
761{
return priv_->source_location_to_keep_regex_str_;}
769{priv_->source_location_to_keep_regex_str_ = r;}
779{
return priv_->changed_enumerator_names_;}
789{priv_->changed_enumerator_names_ = n;}
798const vector<regex::regex_t_sptr>&
800{
return priv_->changed_enumerators_regexp_;}
811{priv_->changed_enumerators_regexp_ = n;}
818{
return priv_->has_strict_fam_conv_;}
826{priv_->has_strict_fam_conv_ = f;}
856 if (comparison::filtering::has_virtual_mem_fn_change(d))
877 d =
is_type_diff(ptr_diff->underlying_type_diff().get());
890 d =
is_type_diff(ref_diff->underlying_type_diff().get());
903 d =
is_type_diff(ptr_diff->underlying_type_diff().get());
909 d =
is_type_diff(ref_diff->underlying_type_diff().get());
918 type_base_sptr ft, st;
959 if (!f->find_data_member(var_name))
965 if (
const regex_t_sptr& data_member_name_regex =
966 priv_->get_potential_data_member_names_regex())
968 bool data_member_matched =
false;
971 if (
regex::match(data_member_name_regex, dm->get_name()))
973 data_member_matched =
true;
977 if (!data_member_matched)
1017 decl_base_sptr member = m.second;
1018 bool matched =
false;
1035 bool matched =
false;
1059 == second_class->get_size_in_bits())))
1071 && (enum_dif->
first_enum()->get_size_in_bits()
1082 bool matched =
true;
1083 for (string_changed_enumerator_map::const_iterator i =
1095 [&] (
const regex_t_sptr& enum_regexp)
1127 if (!names_of_binaries_match(*
this, *ctxt))
1132 if (!sonames_of_binaries_match(*
this, *ctxt))
1153 const type_base_sptr &type)
1160 bool matches =
true;
1163 case type_suppression::UNKNOWN_TYPE_KIND:
1164 case type_suppression::CLASS_TYPE_KIND:
1168 case type_suppression::STRUCT_TYPE_KIND:
1171 if (!klass || !klass->is_struct())
1175 case type_suppression::UNION_TYPE_KIND:
1179 case type_suppression::ENUM_TYPE_KIND:
1183 case type_suppression::ARRAY_TYPE_KIND:
1187 case type_suppression::TYPEDEF_TYPE_KIND:
1191 case type_suppression::BUILTIN_TYPE_KIND:
1218 const string& type_name)
1221 || s.priv_->get_type_name_regex()
1222 || s.priv_->get_type_name_not_regex())
1237 if (
const regex_t_sptr& type_name_regex =
1238 s.priv_->get_type_name_regex())
1244 if (
const regex_t_sptr type_name_not_regex =
1245 s.priv_->get_type_name_not_regex())
1269 const type_base_sptr& type)
1289 string loc_path, loc_path_base;
1290 unsigned loc_line = 0, loc_column = 0;
1291 loc.
expand(loc_path, loc_line, loc_column);
1293 if (regex_t_sptr regexp = s.priv_->get_source_location_to_keep_regex())
1308 || s.priv_->get_source_location_to_keep_regex())
1328 const type_base_sptr& type)
1346 if (cl->get_is_declaration_only())
1350 ABG_ASSERT(!cl->get_definition_of_declaration());
1359 || s.priv_->get_source_location_to_keep_regex())
1382 const string& type_name,
1402 if (!suppression_matches_type_no_name(*
this, type))
1424 if (!suppression_matches_type_no_name(*
this, type))
1434struct type_suppression::insertion_range::priv
1463 : priv_(new priv(begin, end))
1473{
return priv_->begin_;}
1482{
return priv_->end_;}
1571 value = b->as_integer();
1578 && (fn_call->get_name() ==
"offset_of"
1579 || fn_call->get_name() ==
"offset_after"
1580 || fn_call->get_name() ==
"offset_of_first_data_member_regexp"
1581 || fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1582 && fn_call->get_arguments().size() == 1)
1584 if (fn_call->get_name() ==
"offset_of"
1585 || fn_call->get_name() ==
"offset_after")
1587 string member_name = fn_call->get_arguments()[0];
1588 for (class_decl::data_members::const_iterator it =
1595 if ((*it)->get_name() == member_name)
1597 if (fn_call->get_name() ==
"offset_of")
1599 else if (fn_call->get_name() ==
"offset_after")
1604 (*it)->get_type()->get_size_in_bits();
1614 else if (fn_call->get_name() ==
"offset_of_first_data_member_regexp"
1615 || fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1617 string name_regexp = fn_call->get_arguments()[0];
1621 if (fn_call->get_name() ==
"offset_of_first_data_member_regexp")
1623 else if (fn_call->get_name() ==
"offset_of_last_data_member_regexp")
1636 if (b->get_name() == OFFSET_OF_FLEXIBLE_ARRAY_DATA_MEMBER_STRING())
1646 else if (b->get_name() == END_STRING())
1651 value = std::numeric_limits<uint64_t>::max();
1668 return value == std::numeric_limits<uint64_t>::max();
1681{
return dynamic_pointer_cast<type_suppression::insertion_range::integer_boundary>(b);}
1695{
return dynamic_pointer_cast<type_suppression::insertion_range::fn_call_expr_boundary>(b);}
1707{
return dynamic_pointer_cast<type_suppression::insertion_range::named_boundary>(b);}
1711struct type_suppression::insertion_range::boundary::priv
1729struct type_suppression::insertion_range::integer_boundary::priv
1737 priv(uint64_t value)
1746type_suppression::insertion_range::integer_boundary::integer_boundary(uint64_t value)
1747 : priv_(new priv(value))
1756{
return priv_->value_;}
1761type_suppression::insertion_range::integer_boundary::operator uint64_t()
const
1762{
return as_integer();}
1770struct type_suppression::insertion_range::fn_call_expr_boundary::priv
1787type_suppression::insertion_range::fn_call_expr_boundary::
1789 : priv_(new priv(expr))
1797{
return priv_->expr_;}
1803{
return as_function_call_expr();}
1812struct type_suppression::insertion_range::named_boundary::priv
1819 priv(
const string& name)
1828type_suppression::insertion_range::named_boundary::named_boundary(
const string& name)
1829 : priv_(new priv(name))
1837{
return priv_->name_;}
1849{
return dynamic_pointer_cast<type_suppression>(suppr);}
1872 const string& type_name_regexp,
1873 const string& type_name)
1907read_type_kind_string(
const string& input)
1909 if (input ==
"class")
1910 return type_suppression::CLASS_TYPE_KIND;
1911 else if (input ==
"struct")
1912 return type_suppression::STRUCT_TYPE_KIND;
1913 else if (input ==
"union")
1914 return type_suppression::UNION_TYPE_KIND;
1915 else if (input ==
"enum")
1916 return type_suppression::ENUM_TYPE_KIND;
1917 else if (input ==
"array")
1918 return type_suppression::ARRAY_TYPE_KIND;
1919 else if (input ==
"typedef")
1920 return type_suppression::TYPEDEF_TYPE_KIND;
1921 else if (input ==
"builtin")
1922 return type_suppression::BUILTIN_TYPE_KIND;
1924 return type_suppression::UNKNOWN_TYPE_KIND;
1935read_suppression_reach_kind(
const string& input)
1937 if (input ==
"direct")
1939 else if (input ==
"pointer")
1941 else if (input ==
"reference")
1943 else if (input ==
"reference-or-pointer")
1957read_type_suppression(
const ini::config::section& section)
1961 if (section.get_name() !=
"suppress_type"
1962 && section.get_name() !=
"allow_type")
1965 static const char *
const sufficient_props[] = {
1967 "file_name_not_regexp",
1969 "soname_not_regexp",
1974 "source_location_not_in",
1975 "source_location_not_regexp",
1978 sizeof(sufficient_props)/
sizeof(
char*),
1987 string drop_artifact_str = drop_artifact
1988 ? drop_artifact->get_value()->as_string()
1994 string has_size_change_str = has_size_change
1995 ? has_size_change->get_value()->as_string()
2000 string label_str = label ? label->get_value()->as_string() :
"";
2004 string file_name_regex_str =
2005 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
2009 string file_name_not_regex_str =
2010 file_name_not_regex_prop
2011 ? file_name_not_regex_prop->get_value()->as_string()
2016 string soname_regex_str =
2017 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
2021 string soname_not_regex_str =
2022 soname_not_regex_prop
2023 ? soname_not_regex_prop->get_value()->as_string()
2028 string name_regex_str = name_regex_prop
2029 ? name_regex_prop->get_value()->as_string()
2034 string name_not_regex_str = name_not_regex_prop
2035 ? name_not_regex_prop->get_value()->as_string()
2040 string name_str = name_prop
2041 ? name_prop->get_value()->as_string()
2045 section.find_property(
"source_location_not_in");
2046 unordered_set<string> srcloc_not_in;
2047 if (srcloc_not_in_prop)
2050 srcloc_not_in.insert(p->get_value()->as_string());
2057 vector<string>::const_iterator i;
2058 for (i = list_property->get_value()->get_content().begin();
2059 i != list_property->get_value()->get_content().end();
2061 srcloc_not_in.insert(*i);
2068 string srcloc_not_regexp_str;
2069 if (srcloc_not_regexp_prop)
2070 srcloc_not_regexp_str = srcloc_not_regexp_prop->get_value()->as_string();
2072 bool consider_type_kind =
false;
2077 consider_type_kind =
true;
2079 read_type_kind_string(type_kind_prop->get_value()->as_string());
2082 bool consider_reach_kind =
false;
2087 consider_reach_kind =
true;
2089 read_suppression_reach_kind(reach_kind_prop->get_value()->as_string());
2093 string_set_type potential_data_member_names;
2102 tv = prop->get_value();
2105 sv = prop->get_value();
2110 && tv->get_value_items().size() == 1
2123 potential_data_member_names.insert(name);
2126 for (
const string& name : val->get_content())
2127 potential_data_member_names.insert(name);
2131 string name = sv->as_string();
2132 potential_data_member_names.insert(name);
2137 string potential_data_member_names_regexp_str;
2140 potential_data_member_names_regexp_str = prop->get_value()->as_string();
2143 vector<type_suppression::insertion_range_sptr> insert_ranges;
2144 bool consider_data_member_insertion =
false;
2150 string ins_point = prop->get_value()->as_string();
2152 if (ins_point == END_STRING())
2154 else if (ins_point == OFFSET_OF_FLEXIBLE_ARRAY_DATA_MEMBER_STRING())
2156 else if (isdigit(ins_point[0]))
2158 (atoi(ins_point.c_str()));
2167 (
new type_suppression::insertion_range(begin, end));
2168 insert_ranges.push_back(insert_range);
2169 consider_data_member_insertion =
true;
2175 (
"has_data_member_inserted_between")))
2188 && v->get_value_items().size() == 1
2195 string str = val->get_content()[0];
2199 else if (isdigit(str[0]))
2201 (atoi(str.c_str()));
2208 str = val->get_content()[1];
2212 else if (isdigit(str[0]))
2214 (atoi(str.c_str()));
2222 (
new type_suppression::insertion_range(begin, end));
2223 insert_ranges.push_back(insert_range);
2224 consider_data_member_insertion =
true;
2243 (
"has_data_members_inserted_between")))
2245 bool is_well_formed =
true;
2246 for (vector<ini::property_value_sptr>::const_iterator i =
2247 prop->get_value()->get_value_items().begin();
2248 is_well_formed && i != prop->get_value()->get_value_items().end();
2254 || tuple_value->get_value_items().size() != 1
2257 is_well_formed =
false;
2262 if (list_value->get_content().size() != 2)
2264 is_well_formed =
false;
2269 string str = list_value->get_content()[0];
2273 else if (isdigit(str[0]))
2276 (atoi(str.c_str()));
2283 str = list_value->get_content()[1];
2287 else if (isdigit(str[0]))
2289 (atoi(str.c_str()));
2297 (
new type_suppression::insertion_range(begin, end));
2298 insert_ranges.push_back(insert_range);
2299 consider_data_member_insertion =
true;
2301 if (!is_well_formed)
2315 section.find_property(
"changed_enumerators");
2317 vector<string> changed_enumerator_names;
2318 if (changed_enumerators_prop)
2322 changed_enumerator_names =
2323 p->get_value()->get_content();
2326 changed_enumerator_names.push_back(p->get_value()->as_string());
2337 section.find_property(
"changed_enumerators_regexp");
2339 vector<regex_t_sptr> changed_enumerators_regexp;
2340 if (changed_enumerators_regexp_prop)
2345 for (
string e : p->get_value()->get_content())
2346 changed_enumerators_regexp.push_back(regex::
compile(e));
2351 changed_enumerators_regexp.push_back(
2360 (section.find_property(
"has_strict_flexible_array_data_member_conversion"));
2361 string has_strict_fam_conv_str = has_strict_fam_conv
2362 ? has_strict_fam_conv->get_value()->as_string()
2365 if (section.get_name() ==
"suppress_type")
2366 result.reset(
new type_suppression(label_str, name_regex_str, name_str));
2367 else if (section.get_name() ==
"allow_type")
2368 result.reset(
new negated_type_suppression(label_str, name_regex_str,
2371 if (consider_type_kind)
2373 result->set_consider_type_kind(
true);
2374 result->set_type_kind(type_kind);
2377 if (consider_reach_kind)
2379 result->set_consider_reach_kind(
true);
2380 result->set_reach_kind(reach_kind);
2383 if (!potential_data_member_names.empty())
2384 result->set_potential_data_member_names(potential_data_member_names);
2386 if (!potential_data_member_names_regexp_str.empty())
2387 result->set_potential_data_member_names_regex_str
2388 (potential_data_member_names_regexp_str);
2390 if (consider_data_member_insertion)
2391 result->set_data_member_insertion_ranges(insert_ranges);
2393 if (!name_not_regex_str.empty())
2394 result->set_type_name_not_regex_str(name_not_regex_str);
2396 if (!file_name_regex_str.empty())
2397 result->set_file_name_regex_str(file_name_regex_str);
2399 if (!file_name_not_regex_str.empty())
2400 result->set_file_name_not_regex_str(file_name_not_regex_str);
2402 if (!soname_regex_str.empty())
2403 result->set_soname_regex_str(soname_regex_str);
2405 if (!soname_not_regex_str.empty())
2406 result->set_soname_not_regex_str(soname_not_regex_str);
2408 if (!srcloc_not_in.empty())
2409 result->set_source_locations_to_keep(srcloc_not_in);
2411 if (!srcloc_not_regexp_str.empty())
2412 result->set_source_location_to_keep_regex_str(srcloc_not_regexp_str);
2414 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
2415 && ((!name_regex_str.empty()
2416 || !name_str.empty()
2417 || !srcloc_not_regexp_str.empty()
2418 || !srcloc_not_in.empty())))
2419 result->set_drops_artifact_from_ir(
true);
2421 if (has_size_change_str ==
"yes" || has_size_change_str ==
"true")
2422 result->set_has_size_change(
true);
2424 if (result->get_type_kind() == type_suppression::ENUM_TYPE_KIND
2425 && !changed_enumerator_names.empty())
2426 result->set_changed_enumerator_names(changed_enumerator_names);
2428 if (result->get_type_kind() == type_suppression::ENUM_TYPE_KIND
2429 && !changed_enumerators_regexp.empty())
2430 result->set_changed_enumerators_regexp(changed_enumerators_regexp);
2432 if (has_strict_fam_conv_str ==
"yes" || has_strict_fam_conv_str ==
"true")
2433 result->set_has_strict_fam_conversion(
true);
2451function_suppression::parameter_spec::parameter_spec(
size_t i,
2453 const string& tn_regex)
2454 : priv_(new
priv(i, tn, tn_regex))
2464{
return priv_->index_;}
2479{
return priv_->type_name_;}
2487{priv_->type_name_ = tn;}
2500{
return priv_->type_name_regex_str_;}
2514(
const string& type_name_regex_str)
2515{priv_->type_name_regex_str_ = type_name_regex_str;}
2584 const string& ret_tn,
2585 const string& ret_tr,
2587 const string& sym_n,
2588 const string& sym_nr,
2589 const string& sym_v,
2590 const string& sym_vr)
2592 priv_(new
priv(name, nr, ret_tn, ret_tr, ps,
2593 sym_n, sym_nr, sym_v, sym_vr))
2596function_suppression::~function_suppression()
2609 if (s ==
"function-subtype-change")
2611 else if (s ==
"added-function")
2613 else if (s ==
"deleted-function")
2615 else if (s ==
"all")
2618 return UNDEFINED_CHANGE_KIND;
2626{
return priv_->change_kind_;}
2633{priv_->change_kind_ = k;}
2642{
return priv_->name_;}
2660{
return priv_->name_regex_str_;}
2669{priv_->name_regex_str_ = r;}
2679{
return priv_->name_not_regex_str_;}
2689{priv_->name_not_regex_str_ = r;}
2698{
return priv_->return_type_name_;}
2707{priv_->return_type_name_ = tr;}
2723{
return priv_->return_type_regex_str_;}
2739{priv_->return_type_regex_str_ = r;}
2751{
return priv_->parm_specs_;}
2764{priv_->parm_specs_ = p;}
2771{priv_->parm_specs_.push_back(p);}
2782{
return priv_->symbol_name_;}
2793{priv_->symbol_name_ = n;}
2809{
return priv_->symbol_name_regex_str_;}
2825{priv_->symbol_name_regex_str_ = r;}
2844{
return priv_->symbol_name_not_regex_str_;}
2864{priv_->symbol_name_not_regex_str_ = r;}
2875{
return priv_->symbol_version_;}
2886{priv_->symbol_version_ = v;}
2901{
return priv_->symbol_version_regex_str_;}
2916{priv_->symbol_version_regex_str_ = r;}
2924{
return priv_->allow_other_aliases_;}
2932{priv_->allow_other_aliases_ = f;}
2986 if (!names_of_binaries_match(*
this, *ctxt))
2991 if (!sonames_of_binaries_match(*
this, *ctxt))
3006 && fn->
get_symbol()->get_alias_from_name(fname))
3016 symbol_name = sym->get_name();
3017 if (sym->has_aliases() && sym->get_alias_from_name(fname))
3020 a && !a->is_main_symbol();
3021 a = a->get_next_alias())
3022 if (a->get_name() != symbol_name)
3032 const regex_t_sptr name_regex = priv_->get_name_regex();
3040 && fn->
get_symbol()->get_alias_from_name(fname))
3050 symbol_name = sym->get_name();
3051 if (sym->has_aliases())
3054 a && !a->is_main_symbol();
3055 a = a->get_next_alias())
3063 const regex_t_sptr name_not_regex = priv_->get_name_not_regex();
3071 && fn->
get_symbol()->get_alias_from_name(fname))
3081 symbol_name = sym->get_name();
3082 if (sym->has_aliases())
3085 a && !a->is_main_symbol();
3086 a = a->get_next_alias())
3096 string fn_return_type_name = fn->
get_type()->get_return_type()
3097 ?
static_cast<string>
3109 const regex_t_sptr return_type_regex = priv_->get_return_type_regex();
3110 if (return_type_regex
3111 && !
regex::match(return_type_regex, fn_return_type_name))
3117 string fn_sym_name, fn_sym_version;
3121 fn_sym_name = sym->get_name();
3122 fn_sym_version = sym->get_version().str();
3135 if (sym->has_aliases())
3138 a && !a->is_main_symbol();
3139 a = a->get_next_alias())
3140 if (a->get_name() != fn_sym_name)
3147 const regex_t_sptr symbol_name_regex = priv_->get_symbol_name_regex();
3148 if (symbol_name_regex && !
regex::match(symbol_name_regex, fn_sym_name))
3151 const regex_t_sptr symbol_name_not_regex =
3152 priv_->get_symbol_name_not_regex();
3153 if (symbol_name_not_regex
3162 if (sym->has_aliases())
3165 a && !a->is_main_symbol();
3166 a = a->get_next_alias())
3168 if (symbol_name_regex
3172 if (symbol_name_not_regex
3189 const regex_t_sptr symbol_version_regex =
3190 priv_->get_symbol_version_regex();
3191 if (symbol_version_regex
3192 && !
regex::match(symbol_version_regex, fn_sym_version))
3200 type_base_sptr parm_type;
3202 for (parameter_specs_type::const_iterator p =
3207 size_t index = (*p)->get_index();
3209 fn_type->get_parm_at_index_from_first_non_implicit_parm(index);
3213 string fn_parm_type_qualified_name;
3216 parm_type = fn_parm->get_type();
3217 fn_parm_type_qualified_name =
3221 const string& tn = (*p)->get_parameter_type_name();
3224 if (tn != fn_parm_type_qualified_name)
3229 const regex_t_sptr parm_type_name_regex =
3230 (*p)->priv_->get_type_name_regex();
3231 if (parm_type_name_regex)
3234 fn_parm_type_qualified_name))
3299 if (!names_of_binaries_match(*
this, *ctxt))
3305 if (!sonames_of_binaries_match(*
this, *ctxt))
3311 bool no_symbol_name =
false, no_symbol_version =
false;
3321 const regex_t_sptr symbol_name_regex = priv_->get_symbol_name_regex();
3322 if (symbol_name_regex && !
regex::match(symbol_name_regex, sym_name))
3326 no_symbol_name =
true;
3336 const regex_t_sptr symbol_version_regex =
3337 priv_->get_symbol_version_regex();
3338 if (symbol_version_regex
3343 no_symbol_version =
true;
3345 if (no_symbol_name && no_symbol_version)
3380{
return dynamic_pointer_cast<function_suppression>(suppr);}
3395 (
static_cast<unsigned>(l) &
static_cast<unsigned>(r));
3411 (
static_cast<unsigned>(l) |
static_cast<unsigned>(r));
3424 const string& var_name)
3426 if (regex_t_sptr regexp = s.priv_->get_name_regex())
3431 else if (regex_t_sptr regexp = s.priv_->get_name_not_regex())
3436 else if (s.priv_->name_.empty())
3440 if (s.priv_->name_ != var_name)
3458 const string& var_linkage_name)
3460 if (regex_t_sptr regexp = s.priv_->get_symbol_name_regex())
3465 else if (regex_t_sptr regexp =
3466 s.priv_->get_symbol_name_not_regex())
3471 else if (s.priv_->symbol_name_.empty())
3475 if (s.priv_->symbol_name_ != var_linkage_name)
3493 const string& type_name)
3495 if (regex_t_sptr regexp = s.priv_->get_type_name_regex())
3519read_parameter_spec_from_string(
const string& str)
3521 string::size_type cur = 0;
3525 for (; cur < str.size(); ++cur)
3526 if (!isspace(str[cur]))
3531 if (str[cur] ==
'\'')
3534 for (; cur < str.size(); ++cur)
3535 if (!isdigit(str[cur]))
3538 index_str += str[cur];
3542 for (; cur < str.size(); ++cur)
3543 if (!isspace(str[cur]))
3546 bool is_regex =
false;
3547 if (str[cur] ==
'/')
3555 for (; cur < str.size(); ++cur)
3556 if (!isspace(str[cur]))
3558 if (is_regex && str[cur] ==
'/')
3560 type_name += str[cur];
3563 if (is_regex && str[cur] ==
'/')
3566 if (!index_str.empty() || !type_name.empty())
3568 std::string type_name_regex;
3571 type_name_regex = type_name;
3574 function_suppression::parameter_spec* p =
3575 new function_suppression::parameter_spec(atoi(index_str.c_str()),
3576 type_name, type_name_regex);
3591read_function_suppression(
const ini::config::section& section)
3595 if (section.get_name() !=
"suppress_function")
3598 static const char *
const sufficient_props[] = {
3601 "file_name_not_regexp",
3603 "soname_not_regexp",
3609 "return_type_regexp",
3611 "symbol_name_regexp",
3612 "symbol_name_not_regexp",
3614 "symbol_version_regexp",
3617 sizeof(sufficient_props)/
sizeof(
char*),
3626 string drop_artifact_str = drop_artifact
3627 ? drop_artifact->get_value()->as_string()
3632 string change_kind_str = change_kind_prop
3633 ? change_kind_prop->get_value()->as_string()
3638 string label_str = label_prop
3639 ? label_prop->get_value()->as_string()
3644 string file_name_regex_str =
3645 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
3649 string file_name_not_regex_str =
3650 file_name_not_regex_prop
3651 ? file_name_not_regex_prop->get_value()->as_string()
3656 string soname_regex_str =
3657 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
3661 string soname_not_regex_str =
3662 soname_not_regex_prop
3663 ? soname_not_regex_prop->get_value()->as_string()
3668 string name = name_prop
3669 ? name_prop->get_value()->as_string()
3674 string name_regex_str = name_regex_prop
3675 ? name_regex_prop->get_value()->as_string()
3680 string name_not_regex_str = name_not_regex_prop
3681 ? name_not_regex_prop->get_value()->as_string()
3686 string return_type_name = return_type_name_prop
3687 ? return_type_name_prop->get_value()->as_string()
3692 string return_type_regex_str = return_type_regex_prop
3693 ? return_type_regex_prop->get_value()->as_string()
3698 string sym_name = sym_name_prop
3699 ? sym_name_prop->get_value()->as_string()
3704 string sym_name_regex_str = sym_name_regex_prop
3705 ? sym_name_regex_prop->get_value()->as_string()
3710 string sym_name_not_regex_str = sym_name_not_regex_prop
3711 ? sym_name_not_regex_prop->get_value()->as_string()
3716 string sym_version = sym_ver_prop
3717 ? sym_ver_prop->get_value()->as_string()
3722 string sym_ver_regex_str = sym_ver_regex_prop
3723 ? sym_ver_regex_prop->get_value()->as_string()
3728 string allow_other_aliases = allow_other_aliases_prop
3729 ? allow_other_aliases_prop->get_value()->as_string()
3734 for (ini::config::properties_type::const_iterator p =
3735 section.get_properties().begin();
3736 p != section.get_properties().end();
3738 if ((*p)->get_name() ==
"parameter")
3742 if ((parm = read_parameter_spec_from_string
3743 (prop->get_value()->as_string())))
3744 parms.push_back(parm);
3747 result.reset(
new function_suppression(label_str,
3751 return_type_regex_str,
3756 sym_ver_regex_str));
3758 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
3760 || !name_regex_str.empty()
3761 || !name_not_regex_str.empty()
3762 || !sym_name.empty()
3763 || !sym_name_regex_str.empty()
3764 || !sym_name_not_regex_str.empty()))
3765 result->set_drops_artifact_from_ir(
true);
3767 if (!change_kind_str.empty())
3768 result->set_change_kind
3771 if (!allow_other_aliases.empty())
3772 result->set_allow_other_aliases(allow_other_aliases ==
"yes"
3773 || allow_other_aliases ==
"true");
3775 if (!name_not_regex_str.empty())
3776 result->set_name_not_regex_str(name_not_regex_str);
3778 if (!sym_name_not_regex_str.empty())
3779 result->set_symbol_name_not_regex_str(sym_name_not_regex_str);
3781 if (!file_name_regex_str.empty())
3782 result->set_file_name_regex_str(file_name_regex_str);
3784 if (!file_name_not_regex_str.empty())
3785 result->set_file_name_not_regex_str(file_name_not_regex_str);
3787 if (!soname_regex_str.empty())
3788 result->set_soname_regex_str(soname_regex_str);
3790 if (!soname_not_regex_str.empty())
3791 result->set_soname_not_regex_str(soname_not_regex_str);
3853 const string& name_regex_str,
3854 const string& symbol_name,
3855 const string& symbol_name_regex_str,
3856 const string& symbol_version,
3857 const string& symbol_version_regex,
3858 const string& type_name,
3859 const string& type_name_regex_str)
3861 priv_(new
priv(name, name_regex_str,
3862 symbol_name, symbol_name_regex_str,
3863 symbol_version, symbol_version_regex,
3864 type_name, type_name_regex_str))
3882 if (s ==
"variable-subtype-change")
3884 else if (s ==
"added-variable")
3886 else if (s ==
"deleted-variable")
3888 else if (s ==
"all")
3891 return UNDEFINED_CHANGE_KIND;
3899{
return priv_->change_kind_;}
3906{priv_->change_kind_ = k;}
3915{
return priv_->name_;}
3936{
return priv_->name_regex_str_;}
3948{priv_->name_regex_str_ = r;}
3955{
return priv_->name_not_regex_str_;}
3962{priv_->name_not_regex_str_ = r;}
3973{
return priv_->symbol_name_;}
3984{priv_->symbol_name_ = n;}
3997{
return priv_->symbol_name_regex_str_;}
4010{priv_->symbol_name_regex_str_ = r;}
4029{
return priv_->symbol_name_not_regex_str_;}
4049{priv_->symbol_name_not_regex_str_ = r;}
4058{
return priv_->symbol_version_;}
4067{priv_->symbol_version_ = v;}
4079{
return priv_->symbol_version_regex_str_;}
4091{priv_->symbol_version_regex_str_ = r;}
4102{
return priv_->type_name_;}
4113{priv_->type_name_ = n;}
4126{
return priv_->type_name_regex_str_;}
4139{priv_->type_name_regex_str_ = r;}
4194 if (!names_of_binaries_match(*
this, *ctxt))
4200 if (!sonames_of_binaries_match(*
this, *ctxt))
4219 const regex_t_sptr name_regex = priv_->get_name_regex();
4223 const regex_t_sptr name_not_regex = priv_->get_name_not_regex();
4224 if (name_not_regex &&
regex::match(name_not_regex, var_name))
4239 const regex_t_sptr sym_name_regex = priv_->get_symbol_name_regex();
4240 if (sym_name_regex && !
regex::match(sym_name_regex, var_sym_name))
4243 const regex_t_sptr sym_name_not_regex =
4244 priv_->get_symbol_name_not_regex();
4245 if (sym_name_not_regex &&
regex::match(sym_name_not_regex, var_sym_name))
4250 string var_sym_version =
4259 const regex_t_sptr symbol_version_regex =
4260 priv_->get_symbol_version_regex();
4261 if (symbol_version_regex
4262 && !
regex::match(symbol_version_regex, var_sym_version))
4267 string var_type_name =
4279 const regex_t_sptr type_name_regex = priv_->get_type_name_regex();
4280 if (type_name_regex && !
regex::match(type_name_regex, var_type_name))
4343 if (!names_of_binaries_match(*
this, *ctxt))
4348 if (!sonames_of_binaries_match(*
this, *ctxt))
4355 bool no_symbol_name =
false, no_symbol_version =
false;
4370 const regex_t_sptr sym_name_regex = priv_->get_symbol_name_regex();
4371 if (sym_name_regex && !
regex::match(sym_name_regex, sym_name))
4375 no_symbol_name =
true;
4385 const regex_t_sptr symbol_version_regex =
4386 priv_->get_symbol_version_regex();
4387 if (symbol_version_regex
4392 no_symbol_version =
true;
4394 if (no_symbol_name && no_symbol_version)
4429{
return dynamic_pointer_cast<variable_suppression>(s);}
4444 (
static_cast<unsigned>(l) &
static_cast<unsigned>(r));
4460 (
static_cast<unsigned>(l) |
static_cast<unsigned>(r));
4475 if (section.
get_name() !=
"suppress_variable")
4478 static const char *
const sufficient_props[] = {
4481 "file_name_not_regexp",
4483 "soname_not_regexp",
4488 "symbol_name_regexp",
4489 "symbol_name_not_regexp",
4491 "symbol_version_regexp",
4496 sizeof(sufficient_props)/
sizeof(
char*),
4505 string drop_artifact_str = drop_artifact
4506 ? drop_artifact->get_value()->as_string()
4511 string change_kind_str = change_kind_prop
4512 ? change_kind_prop->get_value()->as_string()
4517 string label_str = (label_prop
4518 ? label_prop->get_value()->as_string()
4523 string file_name_regex_str =
4524 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
4528 string file_name_not_regex_str =
4529 file_name_not_regex_prop
4530 ? file_name_not_regex_prop->get_value()->as_string()
4535 string soname_regex_str =
4536 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
4540 string soname_not_regex_str =
4541 soname_not_regex_prop
4542 ? soname_not_regex_prop->get_value()->as_string()
4547 string name_str = (name_prop
4548 ? name_prop->get_value()->as_string()
4553 string name_regex_str = (name_regex_prop
4554 ? name_regex_prop->get_value()->as_string()
4559 string name_not_regex_str = name_not_regex_prop
4560 ? name_not_regex_prop->get_value()->as_string()
4565 string symbol_name = (sym_name_prop
4566 ? sym_name_prop->get_value()->as_string()
4571 string symbol_name_regex_str = sym_name_regex_prop
4572 ? sym_name_regex_prop->get_value()->as_string()
4577 string symbol_name_not_regex_str = sym_name_not_regex_prop
4578 ? sym_name_not_regex_prop->get_value()->as_string()
4583 string symbol_version = sym_version_prop
4584 ? sym_version_prop->get_value()->as_string()
4589 string symbol_version_regex_str = sym_version_regex_prop
4590 ? sym_version_regex_prop->get_value()->as_string()
4595 string type_name_str = type_name_prop
4596 ? type_name_prop->get_value()->as_string()
4601 string type_name_regex_str = type_name_regex_prop
4602 ? type_name_regex_prop->get_value()->as_string()
4605 result.reset(
new variable_suppression(label_str,
4609 symbol_name_regex_str,
4611 symbol_version_regex_str,
4613 type_name_regex_str));
4615 if ((drop_artifact_str ==
"yes" || drop_artifact_str ==
"true")
4616 && (!name_str.empty()
4617 || !name_regex_str.empty()
4618 || !name_not_regex_str.empty()
4619 || !symbol_name.empty()
4620 || !symbol_name_regex_str.empty()
4621 || !symbol_name_not_regex_str.empty()))
4622 result->set_drops_artifact_from_ir(
true);
4624 if (!name_not_regex_str.empty())
4625 result->set_name_not_regex_str(name_not_regex_str);
4627 if (!symbol_name_not_regex_str.empty())
4628 result->set_symbol_name_not_regex_str(symbol_name_not_regex_str);
4630 if (!change_kind_str.empty())
4631 result->set_change_kind
4634 if (!file_name_regex_str.empty())
4635 result->set_file_name_regex_str(file_name_regex_str);
4637 if (!file_name_not_regex_str.empty())
4638 result->set_file_name_not_regex_str(file_name_not_regex_str);
4640 if (!soname_regex_str.empty())
4641 result->set_soname_regex_str(soname_regex_str);
4643 if (!soname_not_regex_str.empty())
4644 result->set_soname_not_regex_str(soname_not_regex_str);
4667 const string& var_name,
4668 const string& var_linkage_name,
4669 bool require_drop_property)
4671 for (
auto i : supprs)
4674 if (require_drop_property && !i->get_drops_artifact_from_ir())
4676 if (!var_name.empty()
4679 if (!var_linkage_name.empty()
4703file_suppression::file_suppression(
const string& label,
4704 const string& fname_regex_str,
4705 const string& fname_not_regex_str)
4708 fname_not_regex_str)
4732 if (file_path.empty())
4738 bool has_regexp =
false;
4740 if (regex_t_sptr regexp = suppression_base::priv_->get_file_name_regex())
4747 if (regex_t_sptr regexp = suppression_base::priv_->get_file_name_not_regex())
4777 if (section.
get_name() !=
"suppress_file")
4780 static const char *
const sufficient_props[] = {
4782 "file_name_not_regexp",
4784 "soname_not_regexp",
4787 sizeof(sufficient_props)/
sizeof(
char*),
4793 string label_str = (label_prop
4794 ? label_prop->get_value()->as_string()
4799 string file_name_regex_str =
4800 file_name_regex_prop ? file_name_regex_prop->get_value()->as_string() :
"";
4804 string file_name_not_regex_str =
4805 file_name_not_regex_prop
4806 ? file_name_not_regex_prop->get_value()->as_string()
4811 string soname_regex_str =
4812 soname_regex_prop ? soname_regex_prop->get_value()->as_string() :
"";
4816 string soname_not_regex_str =
4817 soname_not_regex_prop
4818 ? soname_not_regex_prop->get_value()->as_string()
4822 file_name_regex_str,
4823 file_name_not_regex_str));
4825 if (!soname_regex_str.empty())
4827 result->set_soname_regex_str(soname_regex_str);
4828 result->set_drops_artifact_from_ir(
true);
4831 if (!soname_not_regex_str.empty())
4833 result->set_soname_not_regex_str(soname_not_regex_str);
4834 result->set_drops_artifact_from_ir(
true);
4850{
return dynamic_pointer_cast<file_suppression>(s);}
4867 for (suppressions_type::const_iterator i = sprs.begin(); i != sprs.end(); ++i)
4869 if (s->suppresses_file(file_path))
4888 return suppr.priv_->matches_soname(soname);
4904 const string& filename,
4908 || suppr.priv_->matches_binary_name(filename));
4917 static const char *OPAQUE_TYPES_SUPPR_SPEC_NAME =
4918 "libabigail::OPAQUE_TYPE_LABEL";
4920 return OPAQUE_TYPES_SUPPR_SPEC_NAME;
4965 if (!s.priv_->matches_soname(fe.
dt_soname()))
4972 if (!s.priv_->matches_binary_name(fe.
corpus_path()))
4996 const string& fn_name)
5011 else if (s.priv_->name_.empty())
5015 if (s.priv_->name_ != fn_name)
5035suppression_matches_function_sym_name(
const fe_iface& fe,
5037 const string& fn_linkage_name)
5052 else if (s.priv_->symbol_name_.empty())
5056 if (s.priv_->symbol_name_ != fn_linkage_name)
5077 const string& var_name)
5100 const string& var_linkage_name)
5125 const string& type_name,
5154 symbol->get_name());
5157 symbol->get_name());
5177 const string& sym_name,
5209 const string& fn_name,
5210 const string& fn_linkage_name,
5211 bool require_drop_property)
5216 if (require_drop_property && !i->get_drops_artifact_from_ir())
5218 if (!fn_name.empty()
5219 && suppression_matches_function_name(fe, *suppr, fn_name))
5221 if (!fn_linkage_name.empty()
5222 && suppression_matches_function_sym_name(fe, *suppr,
5249 const string& var_name,
5250 const string& var_linkage_name,
5251 bool require_drop_property)
5256 if (require_drop_property && !i->get_drops_artifact_from_ir())
5258 if (!var_name.empty()
5261 if (!var_linkage_name.empty()
5292 const string& type_name,
5294 bool& type_is_opaque,
5295 bool require_drop_property)
5300 if (require_drop_property && !i->get_drops_artifact_from_ir())
5307 type_is_opaque =
true;
5313 type_is_opaque =
false;
5336 uint64_t range_begin = 0, range_end = 0;
5347 if (range_begin > range_end)
5362 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...
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.
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.
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.
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.