mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-06 14:47:32 +00:00
It turns out we allow member function cloning only for functions that are members of classes, not for functions that are member of unions. This patch fixes that by turning the method class_decl::add_member_function into the class_or_union::add_member_function. Note that there was already an overload of class_or_union::add_member_function; now, all the member functions add_member_function are members of the class_or_union type. The patch then modifies function_decl::clone to make that code avoid assuming that only member functions of classes can be cloned. * include/abg-ir.h (class_or_union::add_member_function): Move the class_decl::add_member_function overload declaration into the class class_or_union class. (class class_decl): Make the class class_or_union be a friend of class_decl. * src/abg-ir.cc (class_decl::add_member_function): Transform the definition of this overload into ... (class_or_union::add_member_function): ... this one. Make sure that when setting the virtual-ness attributes of the member function, we are effectively looking at the a function that is a member of a class. (function_decl::clone): Do not assert that a member function is necessarily a member of a class_decl. It can also a member of a union_decl!. So, rather, assert that the scope of the member function is of type class_or_union. * tests/data/test-diff-pkg/tbb-2017-8.20161128.fc26.x86_64.rpm: New test input RPM. * tests/data/test-diff-pkg/tbb-2017-9.20170118.fc27.x86_64.rpm: * tests/data/test-diff-pkg/tbb-debuginfo-2017-8.20161128.fc26.x86_64.rpm: Likewise. * tests/data/test-diff-pkg/tbb-debuginfo-2017-9.20170118.fc27.x86_64.rpm: Likewise. * tests/data/test-diff-pkg/tbb-2017-8.20161128.fc26.x86_64--tbb-2017-9.20170118.fc27.x86_64.txt: New reference test output. * tests/data/Makefile.am: Add the new test input RPMs to the source distribution. * tests/test-diff-pkg.cc (in_out_specs): Take the new input tests above into account. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
data | ||
Makefile.am | ||
mockfedabipkgdiff.in | ||
print-diff-tree.cc | ||
runtestcanonicalizetypes.sh.in | ||
runtestdefaultsupprs.py.in | ||
runtestfedabipkgdiff.py.in | ||
test-abicompat.cc | ||
test-abidiff-exit.cc | ||
test-abidiff.cc | ||
test-alt-dwarf-file.cc | ||
test-annotate.cc | ||
test-core-diff.cc | ||
test-diff2.cc | ||
test-diff-dwarf-abixml.cc | ||
test-diff-dwarf.cc | ||
test-diff-filter.cc | ||
test-diff-pkg.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-types-stability.cc | ||
test-utils.cc | ||
test-utils.h | ||
test-valgrind-suppressions.supp | ||
test-write-read-archive.cc | ||
update-test-output.py |