diff options
author | Eric Fiselier <eric@efcs.ca> | 2015-04-03 02:26:37 +0300 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2015-04-03 02:26:37 +0300 |
commit | 1b00fc5d8133bab423fc15eb9ce0e930fa0fc709 (patch) | |
tree | f4ce7d87c402556d744d90d0673c0b5a150d5e98 /libcxxabi/src/private_typeinfo.h | |
parent | 696f275954488b7291faf8058a62c62992c33885 (diff) |
[libcxxabi] Fix multi-level pointer conversions and pointer to member conversion detection.
Summary:
Currently there are bugs in out detection of multi-level pointer conversions and pointer to member conversions. This patch fixes the following issues.
* Allow multi-level pointers with different nested qualifiers.
* Allow multi-level mixed pointers to objects and pointers to members with different nested qualifiers.
* Allow conversions from `int Base::*` to `int Derived::*` but only for non-nested pointers.
There is still some work that needs to be done to clean this patch up but I want to get some input on it.
Open questions:
* Does `__pointer_to_member_type_info::can_catch(...)` need to adjust the pointer if a base to derived conversion is performed?
Reviewers: danalbert, compnerd, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8758
llvm-svn: 233984
Diffstat (limited to 'libcxxabi/src/private_typeinfo.h')
-rw-r--r-- | libcxxabi/src/private_typeinfo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxxabi/src/private_typeinfo.h b/libcxxabi/src/private_typeinfo.h index 07e8ddea5333..73ec958d1c76 100644 --- a/libcxxabi/src/private_typeinfo.h +++ b/libcxxabi/src/private_typeinfo.h @@ -230,6 +230,7 @@ class __attribute__ ((__visibility__("default"))) __pointer_type_info public: __attribute__ ((__visibility__("hidden"))) virtual ~__pointer_type_info(); __attribute__ ((__visibility__("hidden"))) virtual bool can_catch(const __shim_type_info*, void*&) const; + __attribute__ ((__visibility__("hidden"))) bool can_catch_nested(const __shim_type_info*) const; }; class __attribute__ ((__visibility__("default"))) __pointer_to_member_type_info @@ -239,6 +240,8 @@ public: const __class_type_info* __context; __attribute__ ((__visibility__("hidden"))) virtual ~__pointer_to_member_type_info(); + __attribute__ ((__visibility__("hidden"))) virtual bool can_catch(const __shim_type_info*, void*&) const; + __attribute__ ((__visibility__("hidden"))) bool can_catch_nested(const __shim_type_info*) const; }; #pragma GCC visibility pop |