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