summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/implicit-exception-spec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/implicit-exception-spec.cpp')
-rw-r--r--test/SemaCXX/implicit-exception-spec.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/SemaCXX/implicit-exception-spec.cpp b/test/SemaCXX/implicit-exception-spec.cpp
index ec853c504a..25316f8d51 100644
--- a/test/SemaCXX/implicit-exception-spec.cpp
+++ b/test/SemaCXX/implicit-exception-spec.cpp
@@ -57,3 +57,33 @@ namespace DefaultArgument {
} t; // expected-note {{has no default constructor}}
};
}
+
+namespace ImplicitDtorExceptionSpec {
+ struct A {
+ virtual ~A();
+
+ struct Inner {
+ ~Inner() throw();
+ };
+ Inner inner;
+ };
+
+ struct B {
+ virtual ~B() {} // expected-note {{here}}
+ };
+
+ struct C : B {
+ virtual ~C() {}
+ A a;
+ };
+
+ struct D : B {
+ ~D(); // expected-error {{more lax than base}}
+ struct E {
+ ~E();
+ struct F {
+ ~F() throw(A);
+ } f;
+ } e;
+ };
+}