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 | 84973e56e3094d4b93d0f1eab9e251c239d6455c (patch) | |
tree | b523e1b1f35717b3a8afcee8aa5f35383ea1fc35 /clang/test/SemaCXX/implicit-exception-spec.cpp | |
parent | 2568bf3089a5dd91bc6ae47934681d70c5e5c0f0 (diff) | |
download | bcm5719-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.cpp | 30 |
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; + }; +} |