Fix regression in r154844. If necessary, defer computing adjusted destructor
exception specifications in C++11 until after we've parsed the exception
specifications for nested classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155293 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/implicit-exception-spec.cpp b/test/SemaCXX/implicit-exception-spec.cpp
index 143d9f7..f3a070a 100644
--- a/test/SemaCXX/implicit-exception-spec.cpp
+++ b/test/SemaCXX/implicit-exception-spec.cpp
@@ -54,3 +54,33 @@
} 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;
+ };
+}