Better detection of void* to something* change
authorDodji Seketeli <dodji@redhat.com>
Thu, 21 Mar 2019 17:08:59 +0000 (18:08 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 21 Mar 2019 17:13:54 +0000 (18:13 +0100)
commit0036d0448ed45af7de7f0f461241040f7d0974f4
tree2619ca23a9c0892a88e171cee4007f4c92d34735
parentfc02416b2847c73909391c062f9e1522aa2c3864
Better detection of void* to something* change

Whenever a void* pointer changes to a T* pointer, we already consider
that change to be ABI-compatible.  The issue though is that we don't
detect the case of foo* changing into T* where foo is typedef void
foo.  This patch fixes that.

* include/abg-ir.h (is_void_type): Add a new overload that takes
type_base*.
* src/abg-ir.cc (is_void_type): Define the new overload that takes
type_base*.
(is_void_pointer_type): Look through typedefs in
the pointed-to type.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-ir.h
src/abg-ir.cc