libabigail/tests/data
Dodji Seketeli 0c820488d4 Bug 21296 - Reporting diff of const ref against non-const ref aborts
References are always const.  But then GCC sometimes emits DWARF that
represents a const reference.  This leads, for instance, to a given
reference to be considered as different from that same reference wraps
into a const qualifier.  Which is wrong.

Libabigail then represents those const references as a particular case
of a "no-op qualifier".  That is, a qualifier that should be ignored
by the comparison code.

In the case of this issue, the comparison engine considers the two
references (const and non-const) to be equal, but the reporting code
forgets to ignore the ignore no-op qualifier and thus (wrongly)
considers the two references as being different.  That inconsistency
leads to an abort of the process.

This patch moves the code that ignores no-op qualifiers at a lower
level of the comparison engine so that whenever function parameters
are compared, no-op qualifiers are ignored as they should.

	* include/abg-fwd.h (look_through_no_op_qualified_type): Declare
	new function.
	* src/abg-ir.cc (look_through_no_op_qualified_type): Define it.
	(compute_diff_for_types): Use the new
	look_through_no_op_qualified_type here rather than open-coding it.
	(equals): In the overload for function_decl::parameter, use the
	new look_through_no_op_qualified_type function.
	* tests/data/test-diff-dwarf/test40-PR21296-clanggcc.cc: Source
	code of the new test inputs.
	* tests/data/test-diff-dwarf/test40-PR21296-clanggcc-report0.txt:
	New test input.
	* tests/data/test-diff-dwarf/test40-PR21296-libgcc.so: New binary
	test input.
	* tests/data/test-diff-dwarf/test40-PR21296-libclang.so: Likewise.
	* tests/test-diff-dwarf.cc (in_out_specs): Add the new test inputs to
	the test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-03-24 12:39:49 +01:00
..
test-abicompat Bug 20887 - Show relative change of offsets 2016-12-02 21:29:28 +01:00
test-abidiff Bug 20887 - Show relative change of offsets 2016-12-02 21:29:28 +01:00
test-abidiff-exit
test-alt-dwarf-file
test-annotate Fix virtual members sorting to unbreak the build on EL6 2017-03-03 12:56:44 +01:00
test-core-diff
test-default-supprs
test-diff-dwarf Bug 21296 - Reporting diff of const ref against non-const ref aborts 2017-03-24 12:39:49 +01:00
test-diff-dwarf-abixml Support Linux Kernel binaries 2017-01-06 12:35:22 +01:00
test-diff-filter [dwarf reader] properly separate function decls and types in lookup 2017-01-16 21:00:54 +01:00
test-diff-pkg Bug 21228 - Handle cloning union member functions 2017-03-07 11:50:56 +01:00
test-diff-suppr Bug 20887 - Show relative change of offsets 2016-12-02 21:29:28 +01:00
test-fedabipkgdiff Make abipkgdiff.cc use the abigail::workers interface 2017-02-27 10:15:33 +01:00
test-lookup-syms
test-read-dwarf Consider file path when sorting virtual member functions 2017-03-03 14:06:34 +01:00
test-read-write Update tests/data/test-read-write/test27.xml 2017-01-05 12:22:54 +01:00
test-types-stability
test-write-read-archive
Makefile.am Bug 21228 - Handle cloning union member functions 2017-03-07 11:50:56 +01:00