Finer detection of local changes of var_decl type

When the size of a var_decl changes, we want the 'equals' function for
var_decl to report that change as being a local one, not a subtype
one.

This patch fixes that.

	* src/abg-ir.cc (equals): In the var_decl overload detect size
	changes of type as being a local change.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2017-09-08 10:15:37 +02:00
parent 2bbfc662d2
commit 3e4c5cafe2

View File

@ -13211,7 +13211,12 @@ equals(const var_decl& l, const var_decl& r, change_kind* k)
{
result = false;
if (k)
{
if (!equals(*l.get_naked_type(), *r.get_naked_type(), 0))
*k |= LOCAL_CHANGE_KIND;
else
*k |= SUBTYPE_CHANGE_KIND;
}
else
return false;
}