summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/exceptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/exceptions.cpp')
-rw-r--r--clang/test/SemaCXX/exceptions.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/exceptions.cpp b/clang/test/SemaCXX/exceptions.cpp
index 486d88eab7b..8e32494825e 100644
--- a/clang/test/SemaCXX/exceptions.cpp
+++ b/clang/test/SemaCXX/exceptions.cpp
@@ -120,3 +120,26 @@ 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}}
+}
OpenPOWER on IntegriCloud