libabigail/include
Dodji Seketeli 1e82b98af2 Do not mark sibling structurally identical nodes as redundant
Consider the C code below:

    int
    foo(int a, int b)
    {
    }

that is changed as:

    float
    foo(float a, float b)
    {
    }

In this case, we want the 'abidiff' tool to report the three
occurrences of the 'int' -> 'float' change (in the return type and in
the two parameter changes of the function foo).

In the current code, the comparison engine only reports the first
occurrence of the change and consider the two other occurrences as
being redundant.  So, by default, it only reports the first occurrence
of the change.

This patch modifies the comparison engine to make it *NOT* mark the
two later occurrences of change as redundant because the three
occurrences of changes happen at the same logical level: they are all
children of the function diff node in the diff tree.

	* include/abg-comparison.h (diff::parent_node): Declare new
	accessor.
	* src/abg-comparison.cc (diff::priv::parent_): New data member.
	(diff::priv::priv): Initialize it.
	(diff::parent_node): Define new accessor.
	(diff::append_child_node): Set the diff::priv::parent_ data member
	of the added child node.
	(redundancy_marking_visitor::visit_begin): If two (logical)
	sibbling nodes are structurally equivalent, do not mark them as
	being redundant.
	* tests/data/test-diff-suppr/libtest10-changed-parm-c-v0.so: New
	test input binary.
	* tests/data/test-diff-suppr/libtest10-changed-parm-c-v1.so:
	Likewise.
	* tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt:
	New test input data.
	* tests/data/test-diff-suppr/test10-changed-parm-c-v0.c: Source
	code for the binary input above.
	* tests/data/test-diff-suppr/test10-changed-parm-c-v1.c: Likewise.
	* tests/data/Makefile.am: Add the new test files to source
	distribution.
	* tests/test-diff-suppr.cc (in_out_specs): Add the new test input
	to the vector of test inputs to run this harness over.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-26 18:45:06 +01:00
..
abg-comp-filter.h Remove useless redundant_filter 2014-10-13 17:39:26 +02:00
abg-comparison.h Do not mark sibling structurally identical nodes as redundant 2014-12-26 18:45:06 +01:00
abg-config.h Doxygen markup fixes final. 2013-08-14 15:07:18 +02:00
abg-corpus.h Support reading and comparing soname from ELF files 2014-12-07 23:42:26 +01:00
abg-diff-utils.h Make the use of a C++-11 compiler optional 2014-11-05 10:45:07 +01:00
abg-dwarf-reader.h Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
abg-fwd.h Extend detection of compatible types to arrays 2014-12-12 14:44:24 +01:00
abg-hash.h Misc style fixes 2014-02-10 15:51:10 +01:00
abg-ini.h Initial support for type suppressions 2014-10-13 17:44:44 +02:00
abg-ir.h Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
abg-libxml-utils.h Serialize and de-serialize elf symbols for var & function decls 2014-05-14 11:19:34 +02:00
abg-libzip-utils.h Initial writing/reading of an ABI corpus to an archive 2013-08-27 16:20:41 +02:00
abg-reader.h Put IR artifacts in the abigail::ir namespace 2014-10-13 17:44:43 +02:00
abg-sptr-utils.h Factorize a no-op deleter for shared pointer 2014-09-30 18:04:14 +02:00
abg-traverse.h Put IR artifacts in the abigail::ir namespace 2014-10-13 17:44:43 +02:00
abg-version.h.in Collapse subdir of include to include. 2013-08-14 15:07:18 +02:00
abg-viz-common.h Forward decls for abg-ir.h, doxygen fixups, restyle. 2013-08-14 15:07:18 +02:00
abg-viz-dot.h Forward decls for abg-ir.h, doxygen fixups, restyle. 2013-08-14 15:07:18 +02:00
abg-viz-svg.h Forward decls for abg-ir.h, doxygen fixups, restyle. 2013-08-14 15:07:18 +02:00
abg-writer.h Put IR artifacts in the abigail::ir namespace 2014-10-13 17:44:43 +02:00
Makefile.am Initial support of ini-style file parsing 2014-10-13 17:44:43 +02:00