libabigail/tests
Dodji Seketeli 85929105f5 Fix redundancy marking for change of types used directly
If a type T is used directly (i.e, not through a pointer or reference)
as a function parameter or as a base class, a change in T should never
be marked as redundant in that context.  Otherwise, the change in that
context might be filtered out, possibly hiding real ABI incompatible
changes.

This patch implements this policy.

Also, it turned out in some circumstances, we where marking the first
visited diff node of a given class of equivalence of nodes as being
redundant, while we should only mark the *subsequently* visited nodes
of that class of equivalence as visited.  The patch also fixes that.

	* include/abg-comparison.h (pointer_map): Make this be a map of
	{size_t, size_t} pairs, rather than {size_t, bool}, so that each
	pointer in the map can be associated to another one.
	(diff_context::diff_has_been_visited): Return the pointer to the
	first diff node of the equivalence class that has been visited.
	* src/abg-comparison.cc (is_pointer_diff, is_reference_diff)
	(is_reference_or_pointer_diff, is_fn_parm_diff, is_base_diff)
	(is_child_node_of_function_parm_diff, is_child_node_of_base_diff):
	Define new static functions.
	(diff_context::diff_has_been_visited): Return the pointer to the
	first diff node of the equivalence class that has been visited.
	(diff_context::mark_diff_as_visited): Save the pointer to the
	first diff node of a given class of equivalence that has been
	visited.
	(redundancy_marking_visitor::visit_begin): If a diff node is a
	child node of a function parameter diff or base diff node and if
	it's not a pointer or reference diff node, then do not mark it as
	redundant.  Also, make sure to not mark the first diff node of a
	given class of equivalence that has been visited, as redundant;
	only the other subsequent nodes should be marked redundant; we
	were hitting this case because of an optimization that makes
	equivalent class diff nodes to share their private (pimpl) data.
	* tests/data/test-diff-filter/test29-finer-redundancy-marking-v{0,1}.o:
	New test input binaries.
	* tests/data/test-diff-filter/test29-finer-redundancy-marking-v{0,1}.cc:
	Source code of the new test input binaries above.
	* tests/data/test-diff-filter/test29-finer-redundancy-marking-report-0.txt:
	New test input.
	* tests/data/Makefile.am: Add the new test material above to the
	source distribution.
	* tests/test-diff-filter.cc (in_out_specs): Make this test harness
	run over the additional test input above.
	* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-06-03 12:13:54 +02:00
..
data Fix redundancy marking for change of types used directly 2015-06-03 12:13:54 +02:00
Makefile.am
print-diff-tree.cc
runtestcanonicalizetypes.sh.in
test-abicompat.cc Make abidiff and abicompat return meaningful exit codes 2015-04-10 16:26:36 +02:00
test-abidiff.cc
test-alt-dwarf-file.cc
test-core-diff.cc
test-diff2.cc
test-diff-dwarf.cc Fix detection of local changes in base classes 2015-06-02 12:34:02 +02:00
test-diff-filter.cc Fix redundancy marking for change of types used directly 2015-06-03 12:13:54 +02:00
test-diff-suppr.cc Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
test-dot.cc
test-ir-walker.cc
test-lookup-syms.cc
test-read-dwarf.cc
test-read-write.cc
test-svg.cc
test-utils.cc
test-utils.h
test-write-read-archive.cc Fix archive writing support 2015-04-24 19:59:19 +02:00