summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support/support.exception
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-03-16 15:10:28 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-03-16 15:10:28 +0000
commitb7361983d180fd14bd070c70542d30d631488ea0 (patch)
treea02c5dceb06d37903dd69fe4628e6f0a5d8e6291 /libcxx/test/std/language.support/support.exception
parentf424990d37c3c79ad8fc3a3a273469fcb72da676 (diff)
downloadbcm5719-llvm-b7361983d180fd14bd070c70542d30d631488ea0.tar.gz
bcm5719-llvm-b7361983d180fd14bd070c70542d30d631488ea0.zip
Fix a problem when calling throw_with_nested with a class marked 'final'. Thanks to STL @ Microsoft for the bug report.
llvm-svn: 232384
Diffstat (limited to 'libcxx/test/std/language.support/support.exception')
-rw-r--r--libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
index 887264a5c6f..dad0df24807 100644
--- a/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
+++ b/libcxx/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp
@@ -36,6 +36,10 @@ public:
friend bool operator==(const B& x, const B& y) {return x.data_ == y.data_;}
};
+#if __cplusplus > 201103L
+struct Final final {};
+#endif
+
int main()
{
{
@@ -100,4 +104,16 @@ int main()
assert(i == 7);
}
}
+#if __cplusplus > 201103L
+ {
+ try
+ {
+ std::throw_with_nested(Final());
+ assert(false);
+ }
+ catch (const Final &f)
+ {
+ }
+ }
+#endif
}
OpenPOWER on IntegriCloud