aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/vla.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/vla.cpp')
-rw-r--r--test/SemaCXX/vla.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/vla.cpp b/test/SemaCXX/vla.cpp
index d63b6335f4533..dae6450553aa3 100644
--- a/test/SemaCXX/vla.cpp
+++ b/test/SemaCXX/vla.cpp
@@ -3,3 +3,17 @@
// PR11925
int n;
int (&f())[n]; // expected-error {{function declaration cannot have variably modified type}}
+
+namespace PR18581 {
+ template<typename T> struct pod {};
+ template<typename T> struct error {
+ typename T::error e; // expected-error {{cannot be used prior to '::'}}
+ };
+ struct incomplete; // expected-note {{forward declaration}}
+
+ void f(int n) {
+ pod<int> a[n];
+ error<int> b[n]; // expected-note {{instantiation}}
+ incomplete c[n]; // expected-error {{incomplete}}
+ }
+}