libabigail/tests/data/test-diff-dwarf/test13-v0.cc
Dodji Seketeli d38b2216a4 Sort reported changed data members by increasing offset
* include/abg-comparison.h (changed_type_or_decl_vector): New
	typedef.
	* include/abg-fwd.h (is_data_member): Change the overload that
	takes a decl_base_sptr to make it return the real var_decl_sptr
	rather than just a bool.
	* src/abg-comparison.cc (ChangedDataMemberComp, DataMemberComp):
	New comparison functors.
	(sort_changed_data_members, sort_data_members): Sorting functions
	for changed data members and data members.
	(class_diff::report): Sort reports for deleted, inserted and
	change data members by the increasing value of the offsets of said
	data members.
	* src/abg-ir.cc (is_data_member): Change the overload that takes a
	decl_base_sptr to make it return the real var_decl_sptr rather
	than just a bool.
	* tests/data/test-bidiff/test-struct1-report.txt: Adjust.
	* tests/data/test-diff-dwarf/test13-report.txt: New test input.
	* tests/data/test-diff-dwarf/test13-v0.cc: Source code for new
	test input.
	* tests/data/test-diff-dwarf/test13-v0.o: New test input.
	* tests/data/test-diff-dwarf/test13-v1.cc: Source code for new
	test input.
	* tests/data/test-diff-dwarf/test13-v1.o: New test input.
	* tests/Makefile.am: Add the new test inputs above to the source
	distribution.
	* tests/test-diff-dwarf.cc: Run this test harness on the new test
	input.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-09-03 09:59:03 +02:00

13 lines
88 B
C++

struct S
{
int m0;
char m1;
unsigned m2;
unsigned char m3;
};
void
foo(S&)
{
}