summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support/support.exception
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-03-14 17:08:47 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-03-14 17:08:47 +0000
commit55cfe4c16beba63d5cd5647da6349fbb886ece08 (patch)
tree347cdffbe84e0ff7ccbbbcb9784d17e8da80b564 /libcxx/test/std/language.support/support.exception
parentb9d8062eda0204206dbf149b52c0a13238e57a78 (diff)
downloadbcm5719-llvm-55cfe4c16beba63d5cd5647da6349fbb886ece08.tar.gz
bcm5719-llvm-55cfe4c16beba63d5cd5647da6349fbb886ece08.zip
Implement LWG2784, and mark 2786, 2795, 2804, 2812, 2826, 2834, 2837 and 2838 as complete - since we do them already
llvm-svn: 297752
Diffstat (limited to 'libcxx/test/std/language.support/support.exception')
-rw-r--r--libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
index 57d193a411c..68cd85038b2 100644
--- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
+++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
@@ -46,12 +46,19 @@ public:
C * operator&() const { assert(false); } // should not be called
};
+class D : private std::nested_exception {};
+
+
+class E1 : public std::nested_exception {};
+class E2 : public std::nested_exception {};
+class E : public E1, public E2 {};
+
int main()
{
{
try
{
- A a(3);
+ A a(3); // not a polymorphic type --> no effect
std::rethrow_if_nested(a);
assert(true);
}
@@ -63,6 +70,30 @@ int main()
{
try
{
+ D s; // inaccessible base class --> no effect
+ std::rethrow_if_nested(s);
+ assert(true);
+ }
+ catch (...)
+ {
+ assert(false);
+ }
+ }
+ {
+ try
+ {
+ E s; // ambiguous base class --> no effect
+ std::rethrow_if_nested(s);
+ assert(true);
+ }
+ catch (...)
+ {
+ assert(false);
+ }
+ }
+ {
+ try
+ {
throw B(5);
}
catch (const B& b)
OpenPOWER on IntegriCloud