[PATCH] [libcxxabi] Disallow Base to Derived conversions for catching pointers to members.
Eric Fiselier
eric at efcs.ca
Mon Apr 6 11:03:53 PDT 2015
Hi mclow.lists, jroelofs, majnemer,
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.
}
}
```
http://reviews.llvm.org/D8845
Files:
src/private_typeinfo.cpp
test/catch_member_data_pointer_01.pass.cpp
test/catch_member_function_pointer_01.pass.cpp
test/catch_multi_level_pointer.pass.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8845.23284.patch
Type: text/x-patch
Size: 4165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150406/ef2e4b6c/attachment.bin>
More information about the cfe-commits
mailing list