diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/SemaCXX/exceptions.cpp | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
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 486d88e..c2ca9f9 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}} |