1 // RUN: %clang_cc1 -fsyntax-only -verify -Wvla %s 2 3 void test1(int n) { 4 int v[n]; // expected-warning {{variable length array used}} 5 } 6 7 void test2(int n, int v[n]) { // expected-warning {{variable length array used}} 8 } 9 10 void test3(int n, int v[n]); // expected-warning {{variable length array used}} 11 12 template<typename T> 13 void test4(int n) { 14 int v[n]; // expected-warning {{variable length array used}} 15 } 16 17 template<typename T> 18 void test5(int n, int v[n]) { // expected-warning {{variable length array used}} 19 } 20 21 template<typename T> 22 void test6(int n, int v[n]); // expected-warning {{variable length array used}} 23 24 template<typename T> 25 void test7(int n, T v[n]) { // expected-warning {{variable length array used}} 26 } 27 28