mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-19 07:40:46 +00:00
2f92777dc8
Since 2013 the implicit 'this' parameter has been excluded from the function parameters taken into account while comparing class member functions. This was an early measure to avoid infinite recursion that would then occur when comparing classes (and thus their member functions that are referenced in their vtable). But since then, we've built descent infrastructure to prevent this kind of recursion in a more generic manner. This patch thus removes that restriction and should therefore lift the concerns expressed in the bug https://sourceware.org/bugzilla/show_bug.cgi?id=26672. Namely, changes to (data members of) a class should now be detected when comparing member functions of that class. With this change, the reference output of several comparison regression tests changed because, obviously, some impacted member functions are now reported along with detecting changes in data membrers of classes. The patch thus adjusts those reference ouputs. The patch also adjust the behaviour of the predicate: "accessed_through = pointer|reference|reference-or-pointer" The idea is to make the predicate work on qualified version of a type. * include/abg-ir.h (function_type::get_first_parm): Declare new accessor. * src/abg-ir.cc (function_type::get_first_parm): Define new accessor. (equals): In the overload for function_type, always take the implicit "this" parameter into account in parameter comparisons. (function_type::get_first_non_implicit_parm): Adjust comment. * src/abg-comp-filter.cc (function_name_changed_but_not_symbol): Avoid potential NULL pointer dereferencing. * src/abg-comparison.cc (function_type_diff::ensure_lookup_tables_populated): Always take the changes to the implicit 'this' parameter into account in the function type diff. (compute_diff): In the overload for function_type, Always compare the implicit 'this' parameter when comparing function parameters. * src/abg-default-reporter.cc (default_reporter::report): Refer to "implicit parameter" when reporting changes on parameters artificially generated by the compiler. * src/abg-suppression.cc (type_suppression::suppresses_diff): Make the 'access_through' predicate work on a qualified version of type 'S', even if it was meant to work on type 'S'. This allows it to work on 'const S', especially when S is accessed through 'pointer to const S', which happens when we consider the implicit 'this' parameter of a const member function. * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Adjust. * tests/data/test-abicompat/test5-fn-changed-report-1.txt: Likewise. * tests/data/test-abidiff-exit/test1-voffset-change-report0.txt: Likewise. * tests/data/test-abidiff/test-PR18791-report0.txt: Likewise. * tests/data/test-abidiff/test-struct1-report.txt: Likewise. * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test0-report.txt: Likewise. * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test29-vtable-changes-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test30-vtable-changes-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test36-ppc64-aliases-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test41-PR20476-hidden-report-0.txt: Likewise. * tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt: Likewise. * tests/data/test-diff-dwarf/test5-report.txt: Likewise. * tests/data/test-diff-dwarf/test8-report.txt: Likewise. * tests/data/test-diff-filter/test0-report.txt: Likewise. * tests/data/test-diff-filter/test01-report.txt: Likewise. * tests/data/test-diff-filter/test10-report.txt: Likewise. * tests/data/test-diff-filter/test13-report.txt: Likewise. * tests/data/test-diff-filter/test2-report.txt: Likewise. * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Likewise. * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Likewise. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise. * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise. * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt: Likewise. * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise. * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt: Likewise. * tests/data/test-diff-filter/test4-report.txt: Likewise. * tests/data/test-diff-filter/test41-report-0.txt: Likewise. * tests/data/test-diff-filter/test9-report.txt: Likewise. * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt: Likewise. * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Likewise. * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-0.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-1.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-10.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-11.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-12.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-13.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-14.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-15.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-16.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-2.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-3.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-4.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-5.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-6.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-7.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-8.txt: Likewise. * tests/data/test-diff-suppr/test24-soname-report-9.txt: Likewise. * tests/data/test-diff-suppr/test31-report-1.txt: Likewise. * tests/data/test-diff-suppr/test33-report-0.txt: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
libtest0-fn-changed-libapp-v0.so | ||
libtest0-fn-changed-libapp-v1.so | ||
libtest1-fn-removed-v0.so | ||
libtest1-fn-removed-v1.so | ||
libtest2-var-removed-v0.so | ||
libtest2-var-removed-v1.so | ||
libtest3-fn-removed-v0.so | ||
libtest3-fn-removed-v1.so | ||
libtest4-soname-changed-v0.so | ||
libtest4-soname-changed-v1.so | ||
libtest5-fn-changed-libapp-v0.so | ||
libtest5-fn-changed-libapp-v1.so | ||
libtest6-var-changed-libapp-v0.so | ||
libtest6-var-changed-libapp-v1.so | ||
libtest7-fn-changed-libapp-v0.so | ||
libtest7-fn-changed-libapp-v1.so | ||
libtest8-fn-changed-libapp-v0.so | ||
libtest8-fn-changed-libapp-v1.so | ||
libtest9-fn-changed-v0.so | ||
libtest9-fn-changed-v1.so | ||
test0-fn-changed-0.suppr | ||
test0-fn-changed-1.suppr | ||
test0-fn-changed-app | ||
test0-fn-changed-app.cc | ||
test0-fn-changed-libapp-v0.cc | ||
test0-fn-changed-libapp-v1.cc | ||
test0-fn-changed-libapp.h | ||
test0-fn-changed-report-0.txt | ||
test0-fn-changed-report-1.txt | ||
test0-fn-changed-report-2.txt | ||
test0-fn-changed-report-3.txt | ||
test1-fn-removed-app | ||
test1-fn-removed-app.cc | ||
test1-fn-removed-report-0.txt | ||
test1-fn-removed-v0.cc | ||
test1-fn-removed-v1.cc | ||
test2-var-removed-app | ||
test2-var-removed-app.cc | ||
test2-var-removed-report-0.txt | ||
test2-var-removed-v0.cc | ||
test2-var-removed-v1.cc | ||
test3-fn-removed-app | ||
test3-fn-removed-app.cc | ||
test3-fn-removed-report-0.txt | ||
test3-fn-removed-v0.cc | ||
test3-fn-removed-v1.cc | ||
test3-fn-removed-version-script-0 | ||
test3-fn-removed-version-script-1 | ||
test4-soname-changed-app | ||
test4-soname-changed-app.cc | ||
test4-soname-changed-report-0.txt | ||
test4-soname-changed-v0.cc | ||
test4-soname-changed-v1.cc | ||
test5-fn-changed-app | ||
test5-fn-changed-app.cc | ||
test5-fn-changed-libapp-v0.cc | ||
test5-fn-changed-libapp-v0.h | ||
test5-fn-changed-libapp-v1.cc | ||
test5-fn-changed-libapp-v1.h | ||
test5-fn-changed-report-0.txt | ||
test5-fn-changed-report-1.txt | ||
test6-var-changed-app | ||
test6-var-changed-app.cc | ||
test6-var-changed-libapp-v0.cc | ||
test6-var-changed-libapp-v0.h | ||
test6-var-changed-libapp-v1.cc | ||
test6-var-changed-libapp-v1.h | ||
test6-var-changed-report-0.txt | ||
test6-var-changed-report-1.txt | ||
test7-fn-changed-app | ||
test7-fn-changed-app.c | ||
test7-fn-changed-libapp-v0.c | ||
test7-fn-changed-libapp-v0.h | ||
test7-fn-changed-libapp-v1.c | ||
test7-fn-changed-libapp-v1.h | ||
test7-fn-changed-report-0.txt | ||
test7-fn-changed-report-1.txt | ||
test7-fn-changed-report-2.txt | ||
test8-fn-changed-app | ||
test8-fn-changed-app.c | ||
test8-fn-changed-libapp-v0.c | ||
test8-fn-changed-libapp-v0.h | ||
test8-fn-changed-libapp-v1.c | ||
test8-fn-changed-libapp-v1.h | ||
test8-fn-changed-report-0.txt | ||
test9-fn-changed-app | ||
test9-fn-changed-app.cc | ||
test9-fn-changed-report-0.txt | ||
test9-fn-changed-v0.cc | ||
test9-fn-changed-v0.h | ||
test9-fn-changed-v1.cc | ||
test9-fn-changed-v1.h |