summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/implicit-exception-spec.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-21 18:42:51 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-21 18:42:51 +0000
commit84973e56e3094d4b93d0f1eab9e251c239d6455c (patch)
treeb523e1b1f35717b3a8afcee8aa5f35383ea1fc35 /clang/test/SemaCXX/implicit-exception-spec.cpp
parent2568bf3089a5dd91bc6ae47934681d70c5e5c0f0 (diff)
downloadbcm5719-llvm-84973e56e3094d4b93d0f1eab9e251c239d6455c.tar.gz
bcm5719-llvm-84973e56e3094d4b93d0f1eab9e251c239d6455c.zip
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. llvm-svn: 155293
Diffstat (limited to 'clang/test/SemaCXX/implicit-exception-spec.cpp')
-rw-r--r--clang/test/SemaCXX/implicit-exception-spec.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/implicit-exception-spec.cpp b/clang/test/SemaCXX/implicit-exception-spec.cpp
index 143d9f7cc87..f3a070a01f7 100644
--- a/clang/test/SemaCXX/implicit-exception-spec.cpp
+++ b/clang/test/SemaCXX/implicit-exception-spec.cpp
@@ -54,3 +54,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;
+ };
+}
OpenPOWER on IntegriCloud