diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | 809500fc2c13c8173a16b052304d983864e4a1e1 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/SemaCXX/exceptions.cpp | |
parent | be7c9ec198dcdb5bf73a35bfbb00b3333cb87909 (diff) |
Diffstat (limited to 'test/SemaCXX/exceptions.cpp')
-rw-r--r-- | test/SemaCXX/exceptions.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/SemaCXX/exceptions.cpp b/test/SemaCXX/exceptions.cpp index 486d88eab7be4..c2ca9f952b229 100644 --- a/test/SemaCXX/exceptions.cpp +++ b/test/SemaCXX/exceptions.cpp @@ -120,3 +120,28 @@ namespace PR6831 { } } } + +namespace Decay { + struct A { + void f() throw (A[10]); + }; + + template<typename T> struct B { + void f() throw (B[10]); + }; + template struct B<int>; + + void f() throw (int[10], int(*)()); + void f() throw (int*, int()); + + template<typename T> struct C { + void f() throw (T); // expected-error {{pointer to incomplete type 'Decay::E' is not allowed in exception specification}} + }; + struct D { + C<D[10]> c; + }; + struct E; // expected-note {{forward declaration}} + C<E[10]> e; // expected-note {{in instantiation of}} +} + +void rval_ref() throw (int &&); // expected-error {{rvalue reference type 'int &&' is not allowed in exception specification}} expected-warning {{C++11}} |