|
libabigail
|
Abstraction of a type suppression specification. More...
#include <abg-suppression.h>
Classes | |
| class | insertion_range |
| The abstraction of a range of offsets in which a member of a type might get inserted. More... | |
| class | priv |
| The private data for type_suppression. More... | |
Public Types | |
| typedef shared_ptr< insertion_range > | insertion_range_sptr |
| A convenience typedef for a shared pointer to insertion_range. More... | |
| typedef vector< insertion_range_sptr > | insertion_ranges |
| A convenience typedef for a vector of insertion_range_sptr. More... | |
| enum | reach_kind { DIRECT_REACH_KIND, POINTER_REACH_KIND, REFERENCE_REACH_KIND, REFERENCE_OR_POINTER_REACH_KIND } |
| The different ways through which the type diff has been reached. More... | |
| enum | type_kind { UNKNOWN_TYPE_KIND, CLASS_TYPE_KIND, STRUCT_TYPE_KIND, UNION_TYPE_KIND, ENUM_TYPE_KIND, ARRAY_TYPE_KIND, TYPEDEF_TYPE_KIND, BUILTIN_TYPE_KIND } |
| The kind of the type the current type suppression is supposed to be about. More... | |
Public Member Functions | |
| type_suppression (const string &label, const string &type_name_regexp, const string &type_name) | |
| Constructor for type_suppression. More... | |
| const vector< string > & | get_changed_enumerator_names () const |
| Getter of the vector of the changed enumerators that are supposed to be suppressed. Note that this will be "valid" only if the type suppression has the 'type_kind = enum' property. More... | |
| 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 be suppressed. Note that this will be "valid" only if the type suppression has the 'type_kind = enum' property. More... | |
| bool | get_consider_reach_kind () const |
| Test if the current type suppression specification suggests to consider how the matching diff node is reached. More... | |
| bool | get_consider_type_kind () const |
| Getter of the property that says whether to consider the kind of type this suppression is about. More... | |
| 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 as far as this suppression specification is concerned. More... | |
| insertion_ranges & | get_data_member_insertion_ranges () |
| Getter for the vector of data member insertion range that specifiers where a data member is inserted as far as this suppression specification is concerned. More... | |
| bool | get_has_size_change () const |
| Getter of the "has_size_change" property. More... | |
| const string_set_type & | get_potential_data_member_names () const |
| Getter of the "potential_data_member_names" property. More... | |
| const string & | get_potential_data_member_names_regex_str () const |
| Getter of the "potential_data_member_names_regex" string. More... | |
| reach_kind | get_reach_kind () const |
| Getter of the way the diff node matching the current suppression specification is to be reached. More... | |
| 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 should not be suppressed. More... | |
| 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. More... | |
| unordered_set< string > & | get_source_locations_to_keep () |
| Getter for the array of source location paths of types that should *NOT* be suppressed. More... | |
| type_kind | get_type_kind () const |
| Getter of the kind of type this suppression is about. More... | |
| const string & | get_type_name () const |
| Getter for the name of the type about which diff reports should be suppressed. More... | |
| const string & | get_type_name_not_regex_str () const |
| Getter for the "type_name_not_regex_str" property of the type suppression specification. More... | |
| const string & | get_type_name_regex_str () const |
| Getter for the "type_name_regex" property of the type suppression specification. More... | |
| bool | has_strict_fam_conversion () const |
| Getter of the "has_string_fam_conversion" property. More... | |
| 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 be "valid" only if the type suppression has the 'type_kind = enum' property. More... | |
| 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 be suppressed. Note that this will be "valid" only if the type suppression has the 'type_kind = enum' property. More... | |
| void | set_consider_reach_kind (bool f) |
| Set a flag saying if the current type suppression specification suggests to consider how the matching diff node is reached. More... | |
| void | set_consider_type_kind (bool f) |
| Setter of the property that says whether to consider the kind of type this suppression is about. More... | |
| 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 as far as this suppression specification is concerned. More... | |
| void | set_has_size_change (bool flag) |
| Setter of the "has_size_change" property. More... | |
| void | set_has_strict_fam_conversion (bool) |
| Setter of the "has_string_fam_conversion" property. More... | |
| void | set_potential_data_member_names (const string_set_type &) const |
| Setter of the "potential_data_member_names" property. More... | |
| void | set_potential_data_member_names_regex_str (const string &) const |
| Setter of the "potential_data_member_names_regex" string. More... | |
| void | set_reach_kind (reach_kind k) |
| Setter of the way the diff node matching the current suppression specification is to be reached. More... | |
| 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 should not be suppressed. More... | |
| 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. More... | |
| void | set_type_kind (type_kind k) |
| Setter of the kind of type this suppression is about. More... | |
| void | set_type_name (const string &name) |
| Setter for the name of the type about which diff reports should be suppressed. More... | |
| 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. More... | |
| void | set_type_name_regex_str (const string &name_regex_str) |
| Setter for the "type_name_regex" property of the type suppression specification. More... | |
| 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 suppressed or not. More... | |
| 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. More... | |
| bool | suppresses_type (const type_base_sptr &type) const |
| Test if the current instance of type_suppression matches a given type. More... | |
| bool | suppresses_type (const type_base_sptr &type, const scope_decl *type_scope) const |
| Test if the current instance of type_suppression matches a given type in a given scope. More... | |
Public Member Functions inherited from suppression_base | |
| suppression_base (const string &label) | |
| Constructor for suppression_base. More... | |
| suppression_base (const string &label, const string &file_name_regex_str, const string &file_name_not_regex_str) | |
| Constructor for suppression_base. More... | |
| bool | get_drops_artifact_from_ir () const |
| Tests if the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not. More... | |
| const string & | get_file_name_not_regex_str () const |
| Getter for the "file_name_not_regex" property of the current instance of suppression_base. More... | |
| const string & | get_file_name_regex_str () const |
| Getter for the "file_name_regex" property of the current instance of suppression_base. More... | |
| bool | get_is_artificial () const |
| Test is the suppression specification is artificial. More... | |
| const string | get_label () const |
| Getter for the label associated to this suppression specification. More... | |
| const string & | get_soname_not_regex_str () const |
| Getter of the "soname_not_regex_str property of the current instance of suppression_base. More... | |
| const string & | get_soname_regex_str () const |
| Getter of the "soname_regex_str property of the current instance of suppression_base. More... | |
| bool | has_file_name_related_property () const |
| Test if the current suppression has a property related to file name. More... | |
| bool | has_soname_related_property () const |
| Test if the current suppression has a property related to SONAMEs. More... | |
| void | set_drops_artifact_from_ir (bool) |
| Set the flag that says whether the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not. More... | |
| 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. More... | |
| void | set_file_name_regex_str (const string ®exp) |
| Setter for the "file_name_regex" property of the current instance of suppression_base. More... | |
| void | set_is_artificial (bool) |
| Set a flag saying if the suppression specification is artificial or not. More... | |
| void | set_label (const string &) |
| Setter for the label associated to this suppression specification. More... | |
| void | set_soname_not_regex_str (const string ®exp) |
| Setter of the "soname_not_regex_str property of the current instance of suppression_base. More... | |
| void | set_soname_regex_str (const string ®exp) |
| Setter of the "soname_regex_str property of the current instance of suppression_base. More... | |
Public Attributes | |
| std::unique_ptr< priv > | priv_ |
Public Attributes inherited from suppression_base | |
| std::unique_ptr< priv > | priv_ |
Abstraction of a type suppression specification.
Specifies under which condition reports about a type diff node should be dropped on the floor.
Definition at line 186 of file abg-suppression.h.
| typedef shared_ptr<insertion_range> insertion_range_sptr |
A convenience typedef for a shared pointer to insertion_range.
Definition at line 230 of file abg-suppression.h.
| typedef vector<insertion_range_sptr> insertion_ranges |
A convenience typedef for a vector of insertion_range_sptr.
Definition at line 235 of file abg-suppression.h.
| enum reach_kind |
The different ways through which the type diff has been reached.
Definition at line 211 of file abg-suppression.h.
| enum type_kind |
The kind of the type the current type suppression is supposed to be about.
Definition at line 198 of file abg-suppression.h.
| type_suppression | ( | const string & | label, |
| const string & | type_name_regexp, | ||
| const string & | type_name | ||
| ) |
Constructor for type_suppression.
| label | the label of the suppression. This is just a free form comment explaining what the suppression is about. |
| type_name_regexp | the regular expression describing the types about which diff reports should be suppressed. If it's an empty string, the parameter is ignored. |
| type_name | the name of the type about which diff reports should be suppressed. If it's an empty string, the parameter is ignored. |
Note that parameter type_name_regexp and type_name_regexp should not necessarily be populated. It usually is either one or the other that the user wants.
Definition at line 505 of file abg-suppression.cc.
| const vector< string > & get_changed_enumerator_names | ( | ) | const |
Getter of the vector of the changed enumerators that are supposed to be suppressed. Note that this will be "valid" only if the type suppression has the 'type_kind = enum' property.
Definition at line 778 of file abg-suppression.cc.
| 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 be suppressed. Note that this will be "valid" only if the type suppression has the 'type_kind = enum' property.
Definition at line 799 of file abg-suppression.cc.
| bool get_consider_reach_kind | ( | ) | const |
Test if the current type suppression specification suggests to consider how the matching diff node is reached.
Definition at line 624 of file abg-suppression.cc.
| bool get_consider_type_kind | ( | ) | const |
Getter of the property that says whether to consider the kind of type this suppression is about.
Definition at line 585 of file abg-suppression.cc.
| const type_suppression::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 as far as this suppression specification is concerned.
Definition at line 716 of file abg-suppression.cc.
| type_suppression::insertion_ranges & get_data_member_insertion_ranges | ( | ) |
Getter for the vector of data member insertion range that specifiers where a data member is inserted as far as this suppression specification is concerned.
Definition at line 725 of file abg-suppression.cc.
| bool get_has_size_change | ( | ) | const |
Getter of the "has_size_change" property.
Definition at line 659 of file abg-suppression.cc.
| const unordered_set< string > & get_potential_data_member_names | ( | ) | const |
Getter of the "potential_data_member_names" property.
Definition at line 674 of file abg-suppression.cc.
| const string & get_potential_data_member_names_regex_str | ( | ) | const |
Getter of the "potential_data_member_names_regex" string.
Definition at line 690 of file abg-suppression.cc.
| type_suppression::reach_kind get_reach_kind | ( | ) | const |
Getter of the way the diff node matching the current suppression specification is to be reached.
Definition at line 643 of file abg-suppression.cc.
| 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 should not be suppressed.
Definition at line 760 of file abg-suppression.cc.
| 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.
Definition at line 734 of file abg-suppression.cc.
| unordered_set< string > & get_source_locations_to_keep | ( | ) |
Getter for the array of source location paths of types that should *NOT* be suppressed.
Definition at line 743 of file abg-suppression.cc.
| type_suppression::type_kind get_type_kind | ( | ) | const |
Getter of the kind of type this suppression is about.
Note that this will be considered during evaluation of the suppression only if type_suppression::get_consider_type_kind() returns true.
Definition at line 615 of file abg-suppression.cc.
| const string & get_type_name | ( | ) | const |
Getter for the name of the type about which diff reports should be suppressed.
| return | the type name. |
Definition at line 577 of file abg-suppression.cc.
| const string & get_type_name_not_regex_str | ( | ) | const |
Getter for the "type_name_not_regex_str" property of the type suppression specification.
This returns a regular expression string that specifies the family of types that should be kept after suppression.
Definition at line 561 of file abg-suppression.cc.
| const string & get_type_name_regex_str | ( | ) | const |
Getter for the "type_name_regex" property of the type suppression specification.
This returns a regular expression string that specifies the family of types about which diff reports should be suppressed.
Definition at line 539 of file abg-suppression.cc.
| bool has_strict_fam_conversion | ( | ) | const |
Getter of the "has_string_fam_conversion" property.
Definition at line 817 of file abg-suppression.cc.
| void set_changed_enumerator_names | ( | const vector< string > & | n | ) |
Setter of the vector of changed enumerators that are supposed to be suppressed. Note that this will be "valid" only if the type suppression has the 'type_kind = enum' property.
| n | the vector of the changed enumerators that are supposed to be suppressed. |
Definition at line 788 of file abg-suppression.cc.
| void set_changed_enumerators_regexp | ( | const vector< regex::regex_t_sptr > & | n | ) |
Setter of the vector of the regular expression strings for changed enumerators that are supposed to be suppressed. Note that this will be "valid" only if the type suppression has the 'type_kind = enum' property.
| n | the vector of the regular expression strings that are supposed to match enumertor names to be suppressed. |
Definition at line 810 of file abg-suppression.cc.
| void set_consider_reach_kind | ( | bool | f | ) |
Set a flag saying if the current type suppression specification suggests to consider how the matching diff node is reached.
| f | the new value of the flag. It's true iff the current type suppression specification suggests to consider how the matching diff node is reached. |
Definition at line 634 of file abg-suppression.cc.
| void set_consider_type_kind | ( | bool | f | ) |
Setter of the property that says whether to consider the kind of type this suppression is about.
| f | the new boolean value of the property. |
Definition at line 593 of file abg-suppression.cc.
| 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 as far as this suppression specification is concerned.
| r | the new insertion range vector. |
Definition at line 707 of file abg-suppression.cc.
| void set_has_size_change | ( | bool | flag | ) |
Setter of the "has_size_change" property.
| flag | the new value of the "has_size_change" property. |
Definition at line 666 of file abg-suppression.cc.
| void set_has_strict_fam_conversion | ( | bool | f | ) |
Setter of the "has_string_fam_conversion" property.
| f | the new value of the "has_string_fam_conversion" property. |
Definition at line 825 of file abg-suppression.cc.
| void set_potential_data_member_names | ( | const string_set_type & | s | ) | const |
Setter of the "potential_data_member_names" property.
| s | the new set of potential data member names of this suppression. |
Definition at line 683 of file abg-suppression.cc.
| void set_potential_data_member_names_regex_str | ( | const string & | d | ) | const |
Setter of the "potential_data_member_names_regex" string.
| d | the new "potential_data_member_names_regex" string. |
Definition at line 698 of file abg-suppression.cc.
| void set_reach_kind | ( | reach_kind | k | ) |
Setter of the way the diff node matching the current suppression specification is to be reached.
| p | the way the diff node matching the current suppression specification is to be reached. |
Definition at line 652 of file abg-suppression.cc.
| void set_source_location_to_keep_regex_str | ( | const string & | r | ) |
Setter of the regular expression string that designates the source location paths of types that should not be suppressed.
| r | the new regular expression. |
Definition at line 768 of file abg-suppression.cc.
| void set_source_locations_to_keep | ( | const unordered_set< string > & | l | ) |
Setter for the array of source location paths of types that should *NOT* be suppressed.
| l | the new array. |
Definition at line 752 of file abg-suppression.cc.
| void set_type_kind | ( | type_kind | k | ) |
Setter of the kind of type this suppression is about.
Note that this will be considered during evaluation of the suppression only if type_suppression::get_consider_type_kind() returns true.
| k | the new kind of type this suppression is about. |
Definition at line 604 of file abg-suppression.cc.
| void set_type_name | ( | const string & | name | ) |
Setter for the name of the type about which diff reports should be suppressed.
| name | the new type name. |
Definition at line 569 of file abg-suppression.cc.
| void set_type_name_not_regex_str | ( | const string & | r | ) |
Setter for the "type_name_not_regex_str" property of the type suppression specification.
This returns a regular expression string that specifies the family of types that should be kept after suppression.
| r | the new regexp string. |
Definition at line 550 of file abg-suppression.cc.
| void set_type_name_regex_str | ( | const string & | name_regex_str | ) |
Setter for the "type_name_regex" property of the type suppression specification.
This sets a regular expression that specifies the family of types about which diff reports should be suppressed.
| name_regex_str | the new regular expression to set. |
Definition at line 528 of file abg-suppression.cc.
|
virtual |
Evaluate this suppression specification on a given diff node and say if the diff node should be suppressed or not.
| diff | the diff node to evaluate this suppression specification against. |
diff should be suppressed. Implements suppression_base.
Reimplemented in negated_type_suppression.
Definition at line 836 of file abg-suppression.cc.
| 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.
| type | the type to consider. |
| ctxt | the context of comparison we are involved with. |
type. Definition at line 1121 of file abg-suppression.cc.
| bool suppresses_type | ( | const type_base_sptr & | type | ) | const |
Test if the current instance of type_suppression matches a given type.
| type | the type to consider. |
type. Definition at line 1400 of file abg-suppression.cc.
| bool suppresses_type | ( | const type_base_sptr & | type, |
| const scope_decl * | type_scope | ||
| ) | const |
Test if the current instance of type_suppression matches a given type in a given scope.
| type | the type to consider. |
| type_scope | the scope of type type. |
type from scope type_scope. Definition at line 1421 of file abg-suppression.cc.
1.8.10