diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-12-14 18:01:56 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-12-14 18:01:56 +0000 |
commit | 94b5bc4263609a620277d5678713f5e13efbb607 (patch) | |
tree | 7f43b8ce90aa880e6b6f55282863d2f358de9200 /libcxx/include/exception | |
parent | 280f7101e8c82ae7e09a71f439dbcce18f2e18fc (diff) | |
download | bcm5719-llvm-94b5bc4263609a620277d5678713f5e13efbb607.tar.gz bcm5719-llvm-94b5bc4263609a620277d5678713f5e13efbb607.zip |
Fix a corner case that involved calling rethrow_if_nested with a type that had a deleted operator&. Added a test to catch this as well. Thanks to Ville for the heads-up.
llvm-svn: 255517
Diffstat (limited to 'libcxx/include/exception')
-rw-r--r-- | libcxx/include/exception | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/exception b/libcxx/include/exception index 5a905e7e58d..686e4ecd057 100644 --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -235,7 +235,7 @@ rethrow_if_nested(const _Ep& __e, typename enable_if< is_polymorphic<_Ep>::value >::type* = 0) { - const nested_exception* __nep = dynamic_cast<const nested_exception*>(&__e); + const nested_exception* __nep = dynamic_cast<const nested_exception*>(_VSTD::addressof(__e)); if (__nep) __nep->rethrow_nested(); } |