diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-21 18:42:51 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-21 18:42:51 +0000 |
commit | a4156b8574666aa69a2b0ad35dc9e9603433e4ae (patch) | |
tree | fb5fc19b6bc87ff046706add9572d6963d225a89 /test/SemaCXX/implicit-exception-spec.cpp | |
parent | 94d55d7ecdd693788a8f3910a0da1b5ecdaa8a86 (diff) |
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
Diffstat (limited to 'test/SemaCXX/implicit-exception-spec.cpp')
-rw-r--r-- | test/SemaCXX/implicit-exception-spec.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/SemaCXX/implicit-exception-spec.cpp b/test/SemaCXX/implicit-exception-spec.cpp index 143d9f7cc8..f3a070a01f 100644 --- a/test/SemaCXX/implicit-exception-spec.cpp +++ b/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; + }; +} |