Do not forget parm sub-type changes as opposed to parm changes

* src/abg-comparison.cc
	(function_decl_diff::ensure_lookup_tables_populated): A parm
	change is valid only when the added parm has a different name from
	the removed parm.  Both have the same index, of course.  In that
	case, do not try to remove the corresponding parm sub-type change.
	* tests/data/test-bidiff/test-enum0-report.txt: Adjust.
	* tests/data/test-bidiff/test-enum1-report.txt: Adjust.
	* tests/data/test-bidiff/test-qual-type0-report.txt: Adjust.
	* tests/data/test-bidiff/test-struct0-report.txt: Adjust.
	* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
	* tests/data/test-diff-dwarf/test1-report.txt: Adjust.
	* tests/data/test-diff-filter/test0-report.txt: Adjust.
	* tests/data/test-diff-filter/test01-report.txt: Adjust.
	* tests/data/test-diff-filter/test1-report.txt: Adjust.
	* tests/data/test-diff-filter/test2-report.txt: Adjust.
	* tests/data/test-diff-filter/test3-report.txt: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-04-03 15:53:27 +02:00
parent 27df878b59
commit 712320ab4c
12 changed files with 16 additions and 15 deletions

View File

@ -4395,9 +4395,10 @@ function_decl_diff::ensure_lookup_tables_populated()
priv_->deleted_parms_by_id_.find(parm->get_index());
if (k != priv_->deleted_parms_by_id_.end())
{
priv_->changed_parms_by_id_[parm->get_index()] =
std::make_pair(k->second, parm);
priv_->subtype_changed_parms_.erase(parm_name);
if (*k->second != *parm
&& (k->second->get_name_id() != parm_name))
priv_->changed_parms_by_id_[parm->get_index()] =
std::make_pair(k->second, parm);
priv_->added_parms_.erase(parm_name);
priv_->deleted_parms_.erase(k->second->get_name_id());
priv_->deleted_parms_by_id_.erase(parm->get_index());

View File

@ -8,7 +8,7 @@
1 changed declaration:
'function void foo(E)' was changed to 'function void foo(E)':
parameter 0 of type 'enum E' changed:
parameter 0 of type 'enum E' has sub-type changes:
1 enumerator deletion:
'E::e2' value '1'

View File

@ -8,7 +8,7 @@
1 changed declaration:
'function void foo(E)' was changed to 'function void foo(E)':
parameter 0 of type 'enum E' changed:
parameter 0 of type 'enum E' has sub-type changes:
1 enumerator insertion:
'E::e1' value '1'

View File

@ -11,6 +11,6 @@
unqualified underlying type class S0 changed, as reported earlier
1 changed declaration:
'function void foo(const S0&)' was changed to 'function void foo(const S0&)':
parameter 0 of type 'const S0&' changed:
parameter 0 of type 'const S0&' has sub-type changes:
in referenced type 'const S0':
unqualified underlying type class S0 changed, as reported earlier

View File

@ -14,5 +14,5 @@
referenced type 'class s0' changed, as reported earlier
1 changed declaration:
'function int foo(s0&)' was changed to 'function int foo(s0&)':
parameter 0 of type 's0&' changed:
parameter 0 of type 's0&' has sub-type changes:
referenced type 'class s0' changed, as reported earlier

View File

@ -4,7 +4,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
2 functions with some indirect sub-type change:
[C]'function void foo(const S0&, S1*)' has some indirect sub-type changes:
parameter 0 of type 'const S0&' changed:
parameter 0 of type 'const S0&' has sub-type changes:
in unqualified underlying type 'S0&':
in referenced type 'class S0':
size changed from 96 to 128 bits

View File

@ -4,7 +4,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 function with some indirect sub-type change:
[C]'function void foo(const S&)' has some indirect sub-type changes:
parameter 0 of type 'const S&' changed:
parameter 0 of type 'const S&' has sub-type changes:
in unqualified underlying type 'S&':
in referenced type 'struct S':
size changed from 64 to 96 bits

View File

@ -4,7 +4,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 function with some indirect sub-type change:
[C]'function void foo(const S0&, S1*)' has some indirect sub-type changes:
parameter 0 of type 'const S0&' changed:
parameter 0 of type 'const S0&' has sub-type changes:
in unqualified underlying type 'S0&':
in referenced type 'class S0':
size changed from 96 to 128 bits

View File

@ -6,7 +6,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
[C]'method void S1::member0()' has some indirect sub-type changes:
'method void S1::member0()' access changed from 'private' to 'public'
[C]'function void foo(const S0&, S1*)' has some indirect sub-type changes:
parameter 0 of type 'const S0&' changed:
parameter 0 of type 'const S0&' has sub-type changes:
in unqualified underlying type 'S0&':
in referenced type 'class S0':
size changed from 96 to 128 bits

View File

@ -4,7 +4,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 function with some indirect sub-type change:
[C]'function void bar(C1*)' has some indirect sub-type changes:
parameter 0 of type 'C1*' changed:
parameter 0 of type 'C1*' has sub-type changes:
in pointed to type 'class C1':
size changed from 32 to 64 bits
1 data member change:

View File

@ -4,7 +4,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
2 functions with some indirect sub-type change:
[C]'function void foo(const C0&)' has some indirect sub-type changes:
parameter 0 of type 'const C0&' changed:
parameter 0 of type 'const C0&' has sub-type changes:
in unqualified underlying type 'C0&':
in referenced type 'struct C0':
size changed from 16 to 24 bits
@ -18,7 +18,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 member function insertion:
'method C0::C0()'
[C]'function void bar(const C1&)' has some indirect sub-type changes:
parameter 0 of type 'const C1&' changed:
parameter 0 of type 'const C1&' has sub-type changes:
in unqualified underlying type 'C1&':
in referenced type 'class C1':
size changed from 8 to 64 bits

View File

@ -4,7 +4,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 function with some indirect sub-type change:
[C]'function void bar(int, const S&)' has some indirect sub-type changes:
parameter 1 of type 'const S&' changed:
parameter 1 of type 'const S&' has sub-type changes:
in unqualified underlying type 'S&':
in referenced type 'struct S':
size changed from 8 to 64 bits