mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-23 18:22:08 +00:00
29bc673dc0
While looking at the abidiff report emitted for two versions of the TBB library, I noticed that some diff nodes were not marked as redundant as they should be. As a result, they were being reported as having "been reported earlier", which seems to be an acceptable cruft to me especially now that the comparison IR can do proper redundancy detection and marking. I tracked that down and it's because the child node of a qualified_type_diff is just the underlying type diff node, whereas during reporting, we report about the leaf underlying type diff node, which can be different from the just the underlying type diff node because the later is always non-qualified. The fix is to make the child node of qualified_type_diff be the leaf underlying type diff node, so that diff tree walking (for the purpose of redundancy detection) and reporting are all looking at the same tree. * include/abg-comparison.h (qualified_type_diff::leaf_underlying_type_diff): Declare new accessor. * src/abg-comparison.cc (get_leaf_type): Forward declare this static function. (qualified_type_diff::priv::leaf_underlying_type_diff): Define new data member. (qualified_type_diff::leaf_underlying_type_diff): Define this new accessor. (qualified_type_diff::chain_into_hierarchy): Call leaf_underlying_type_diff() here rather than underlying_type_diff(). (qualified_type_diff::report): Use leaf_underlying_type_diff() rather than re-computing the diff between the two leaf underlying type diff nodes. * libtest26-qualified-redundant-node-v{0,1}.so: New binary test input files. * tests/data/test-diff-filter/test26-qualified-redundant-node-v{0,1}.cc: Source code for the binary test inputs above. * tests/test-diff-filter.cc (int_out_spec): Add the new test input to the vector of test input data over which to run this test harness. * tests/data/test-diff-filter/test26-qualified-redundant-node-report-{0,1.txt: New test input file. * tests/data/Makefile.am: Add the new test input data to the source distribution. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
data | ||
Makefile.am | ||
print-diff-tree.cc | ||
test-abicompat.cc | ||
test-abidiff.cc | ||
test-alt-dwarf-file.cc | ||
test-core-diff.cc | ||
test-diff2.cc | ||
test-diff-dwarf.cc | ||
test-diff-filter.cc | ||
test-diff-suppr.cc | ||
test-dot.cc | ||
test-ir-walker.cc | ||
test-lookup-syms.cc | ||
test-read-dwarf.cc | ||
test-read-write.cc | ||
test-svg.cc | ||
test-utils.cc | ||
test-utils.h | ||
test-write-read-archive.cc |