diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
| commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
| tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/SemaCXX/vla.cpp | |
| parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/vla.cpp')
| -rw-r--r-- | test/SemaCXX/vla.cpp | 14 |
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}} + } +} |
