mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-18 16:04:34 +00:00
d2c88645e8
When writting a suppression specification in which the user wants to keep a family of types (whose names set is specified by a regular expression) and suppress/drop all other types, one needs to write something like: [suppress_type] name_regexp = (?!the-regexp-of-the-types-to-keep) It would be nicer (like what is done for other properties that take regular expressions as value in suppression specifications) to be able to write: [suppress_type] name_not_regexp = the-regexp-of-types-to-keep This patch does just that. It augments the abigail::suppr::type_suppression type to make it carry the new 'name_not_regex' property. It updates the suppression engine to take the 'name_not_regex' property into account when interpreting instances of abigail::suppr::type_suppression. The parser for type suppression directives is updated to recognize the new name_not_regexp property. The manual has been updated accordingly to describe the new property. New regression tests have been added. * doc/manuals/libabigail-concepts.rst: Update this to document the new name_not_regexp property of the suppress_type directive. * include/abg-suppression.h (type_suppression::{g,s}et_type_name_not_regex_str): Declare new accessors. * src/abg-suppression-priv.h (type_suppression::priv::{type_name_not_regex_str_, type_name_not_regex_}): Define new data members. (type_suppression::priv::{get_type_name_not_regex, set_type_name_not_regex, get_type_name_not_regex_str, set_type_name_not_regex_str}): Define new member functions. * src/abg-suppression.cc (type_suppression::get_type_name_regex_str): Fix comments. (type_suppression::{set_type_name_not_regex_str, get_type_name_not_regex_str}): Define new data members. (suppression_matches_type_name): Adapt to support the new type_name_not_regex property. (read_type_suppression): Support parsing the type_name_not_regexp property. * tests/data/test-diff-suppr/test42-negative-suppr-type-report-0.txt: New test reference output. * tests/data/test-diff-suppr/test42-negative-suppr-type-report-1.txt: Likewise. * tests/data/test-diff-suppr/test42-negative-suppr-type-suppr-1.txt: New test input. * tests/data/test-diff-suppr/test42-negative-suppr-type-suppr-2.txt: Likewise. * tests/data/test-diff-suppr/test42-negative-suppr-type-v0.{cc, o}: Likewise. * tests/data/test-diff-suppr/test42-negative-suppr-type-v1.{cc, o}: Likewise. * tests/data/Makefile.am: Add the test files above to source distribution. * tests/test-diff-suppr.cc (int_out_specs): Add the new tests to the harness. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
api | ||
manuals | ||
vizualization | ||
website | ||
Makefile.am | ||
suppr-doc.txt |