[libcxxabi] Disallow Base to Derived conversions for catching pointers to members.
authorEric Fiselier <eric@efcs.ca>
Mon, 6 Apr 2015 23:03:01 +0000 (23:03 +0000)
committerEric Fiselier <eric@efcs.ca>
Mon, 6 Apr 2015 23:03:01 +0000 (23:03 +0000)
commitb6030b9dbf1762877795fabbea7c7b4b7dbf627e
treecbd7d45812e277dade8c9ab0e5370a3eac26c5df
parent7c869e48210d1adcca8413ec1533dcf8ff5da56d
[libcxxabi] Disallow Base to Derived conversions for catching pointers to members.

Summary:
I accidentally implemented the 4.11 [conv.mem] conversions for libc++abi in a recent patch. @majnemer pointed out that 5.13 [except.handle] only allows the pointer conversions in 4.10 and not those is 4.11. This patch no longer allows the following example code:

```c++
struct A {};
struct B : public A {};

int main() {
  try {
    throw (int A::*)0;
  } catch (int B::*) {
    // exception caught here.
  }
}
```

Reviewers: mclow.lists, jroelofs, majnemer

Reviewed By: majnemer

Subscribers: majnemer, cfe-commits

Differential Revision: http://reviews.llvm.org/D8845

llvm-svn: 234254
libcxxabi/src/private_typeinfo.cpp
libcxxabi/test/catch_member_data_pointer_01.pass.cpp
libcxxabi/test/catch_member_function_pointer_01.pass.cpp
libcxxabi/test/catch_multi_level_pointer.pass.cpp