]> sourceware.org Git - libabigail.git/commit
Try harder to handle pointer/reference to void
authorDodji Seketeli <dodji@redhat.com>
Fri, 26 Dec 2014 17:28:20 +0000 (18:28 +0100)
committerDodji Seketeli <dodji@redhat.com>
Fri, 26 Dec 2014 17:45:06 +0000 (18:45 +0100)
commit3ca026b0eebf3b9df098f0c133fc77fc1b353d78
treeeb5f684e11c19ddf562bb0793e0a8267b141c153
parent1e82b98af2d35aed757df1613b5796db6a57d1f9
Try harder to handle pointer/reference to void

When a pointer_type_def or reference_type_def is initialized with an
empty pointed-to type, we want consider that as a pointer/reference to
void.

This patch does that.  That helps to avoids to later crash because the
pointed-to-type is empty.  Also, this patch fixes spots where the
pointed-to-type seems nonetheless empty.

I have used the two different versions of libstdc++ from RHEL 6.5 and RHEL
7 to spot and fix these issues.

* include/abg-fwd.h (type_or_void): Declare new function.
* src/abg-ir.cc (type_or_void): Define it.
(pointer_type_def::pointer_type_def)
(reference_type_def::reference_type_def)
(reference_type_def::get_qualified_name, strip_typedef): Use it to
ensure that empty pointed-to-type is considered as a void type.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-fwd.h
src/abg-ir.cc
This page took 0.036888 seconds and 5 git commands to generate.