mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-20 17:00:36 +00:00
4b7e295b20
The comparison engine doesn't take virtual offset changes into account when deciding if a diff node carries an incompatible change. This is obviously an oversight. Fixed thus. * include/abg-comparison.h (enum diff_category): Adjust the comment for enumerator VIRTUAL_MEMBER_CHANGE_CATEGORY; changes of this category are incompatible ABI changes. (corpus_diff::diff_stats::num_func_with_virtual_offset_changes): Declare new accessors. * src/abg-comparison.cc (corpus_diff::diff_stats::priv::num_func_with_virt_offset_changes): New data member. (corpus_diff::diff_stats::priv::priv): Initialize the new data member. (corpus_diff::diff_stats::num_func_with_virtual_offset_changes): Define new accessors. (corpus_diff::priv::apply_filters_and_compute_diff_stats): Use the new accessor to set the number of functions with virtual offset changes onto the stats data structure. (corpus_diff::has_incompatible_changes): Take functions with virtual offset changes into account. * tests/test-abidiff-exit.cc: New test harness to test for exit codes of abidiff. * tests/Makefile.am: Build the new test harness runtestabidiff from the test-abidiff-exit.cc source file. * tests/data/test-abidiff-exit/test1-voffset-change-report0.txt: New reference test output. * tests/data/test-abidiff-exit/test1-voffset-change-v0.cc: New test input source code. * tests/data/test-abidiff-exit/test1-voffset-change-v0.o: New test input. * tests/data/test-abidiff-exit/test1-voffset-change-v1.cc: New test input source code. * tests/data/test-abidiff-exit/test1-voffset-change-v1.o: New test input. * tests/data/Makefile.am: tests/data/Makefile.am: Add the new test inputs above to the source distribution. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
20 lines
228 B
C++
20 lines
228 B
C++
// Compile with:
|
|
//
|
|
// g++ -g -Wall -c test1-voffset-change-v0.cc
|
|
//
|
|
|
|
class C
|
|
{
|
|
public:
|
|
virtual int virtual_func0();
|
|
virtual char virtual_func1();
|
|
};
|
|
|
|
int
|
|
C::virtual_func0()
|
|
{return 0;}
|
|
|
|
char
|
|
C::virtual_func1()
|
|
{return 0;}
|