Fix logic of function parmeters diff redundancy detection

When looking at something else, I noticed that the code that detects
that a diff node for a function parameter was being redundant with
respect to another diff node for a parameter of the same function had
a bug; if a function parameter diff node (for a function that has more
than one parameter diff node) carried a change, then that diff node
was always considered to be redundant with another parameter diff node
of the same function.  This patch fixes that.

	* src/abg-comparison.cc (redundancy_marking_visitor::visit_begin):
	For a given function parameter diff node N, we were comparing it
	against the other parmeter diff nodes of the function.  This
	change ensures that we do not compare N against itself.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2015-01-09 14:11:02 +01:00
parent 7c2a0940e2
commit 3c22bdae88

View File

@ -12111,6 +12111,8 @@ struct redundancy_marking_visitor : public diff_node_visitor
if (fn_parm_diff_sptr f =
dynamic_pointer_cast<fn_parm_diff>(*s))
sib = f->get_type_diff().get();
if (sib == d)
continue;
if (sib->get_canonical_diff() == d->get_canonical_diff())
{
redundant_with_sibling_node = true;