[has_type_change] Better detect type size changes
authorDodji Seketeli <dodji@redhat.com>
Wed, 4 Sep 2019 09:07:59 +0000 (11:07 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 30 Sep 2019 12:55:43 +0000 (14:55 +0200)
While looking at something else, I noticed that we could be missing
type size changes on function parameters when using has_type_change.

Fixed thus.

* src/abg-comp-filter.cc (has_type_change): Support function
parameters.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-comp-filter.cc

index d412bca..eb383c5 100644 (file)
@@ -176,6 +176,9 @@ has_type_size_change(const diff* diff)
   if (!diff)
     return false;
 
+  if (const fn_parm_diff* fn_parm_d = is_fn_parm_diff(diff))
+    diff = fn_parm_d->type_diff().get();
+
   type_base_sptr f = is_type(diff->first_subject()),
     s = is_type(diff->second_subject());