[PATCH] [libcxxabi] Fix multi-level pointer conversions and pointer to member conversion detection.

Eric Fiselier eric at efcs.ca
Tue Mar 31 19:53:06 PDT 2015


Hi mclow.lists, danalbert, compnerd,

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?

http://reviews.llvm.org/D8758

Files:
  src/private_typeinfo.cpp
  src/private_typeinfo.h
  test/catch_member_data_pointer_01.pass.cpp
  test/catch_pointer_nullptr.pass.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8758.23027.patch
Type: text/x-patch
Size: 10763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150401/c2c3c782/attachment.bin>


More information about the cfe-commits mailing list