mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-20 17:00:36 +00:00
0cd814766b
It turned out it's important to be able to suppress changes about types that are reachable from a function parameter only through e.g, a pointer or a reference, so that only changes types that are reachable directly from a function parameter are emitted. This patch adds that feature. While doing this, I noticed this: Suppose a diff node D2 is marked as being redundant with a diff node D1 seen previously. So only D1 is reported; D2 is not, because it's been filtered out, because it's redundant with D1. But then suppose D1 is filtered out, due to a suppression specification. At that point, D2 should not be marked redundant anymore, and should be reported. Of course, the code before this patch was wrongly filtering D2 *and* D1 out. So this patch fixes that. * include/abg-comparison.h (enum type_suppression::reach_kind): Define new enum. (type_suppression::{get_consider_reach_kind, set_consider_reach_kind, get_reach_kind, mark_last_diff_visited_per_class_of_equivalence, clear_last_diffs_visited_per_class_of_equivalence, get_last_visited_diff_of_class_of_equivalence}): Declare new member functions. * src/abg-comparison.cc (diff_has_ancestor_filtered_out) (read_suppression_reach_kind): Define static function. (type_suppression::priv::{consider_reach_kind_, reach_kind_}): Define new data members. (type_suppression::priv::priv): Take a new reach_kind parameter. (type_suppression::type_suppression): Adjust to new prototype of priv constructor. (type_suppression::{get_consider_reach_kind, set_consider_reach_kind, get_reach_kind, set_reach_kind}): Define new member functions. (type_suppression::suppresses_diff): Interpret the result of type_suppression::get_reach_kind() to determine if the suppression specification suppresses a given diff node. (read_type_suppression): Support reading the content of the "accessed_through" property. (diff_context::priv::last_visited_diff_node_): New data member. (diff_context::{mark_last_diff_visited_per_class_of_equivalence, clear_last_diffs_visited_per_class_of_equivalence, get_last_visited_diff_of_class_of_equivalence}): Define new data members. (redundancy_marking_visitor::visit_begin): So if the current diff node has already been visited, but if the previously visited node has been filtered out, then do not mark this node as being redundant. And mark the current diff node as being the last visited one in its class of equivalence. (categorize_redundancy): Clear the map of diff nodes visited per class of equivalence. * doc/manuals/libabigail-concepts.rst: Document the new 'accessed_through' property. * tests/data/test-diff-suppr/test13-suppr-through-pointer-0.suppr: New test input data. * tests/data/test-diff-suppr/test13-suppr-through-pointer-report-{0,1}.txt: Likewise. * tests/data/test-diff-suppr/libtest13-suppr-through-pointer-v{0,1}.so: New test input binaries. * tests/data/test-diff-suppr/test13-suppr-through-pointer-v{0,1}.cc: Source code of the test input binaries above. * tests/data/test-diff-suppr/test14-suppr-non-redundant-0.suppr: New test input data. * tests/data/test-diff-suppr/test14-suppr-non-redundant-report-0.txt: Likewise. * tests/data/test-diff-suppr/test14-suppr-non-redundant-v{0,1}.o: New test input binaries. * tests/data/test-diff-suppr/test14-suppr-non-redundant-v{0,1}.cc: Source code of the binaries above. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
api | ||
manuals | ||
vizualization | ||
website | ||
Makefile.am | ||
suppr-doc.txt |