extwarn about VLAs in C89 mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41545 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/c89.c b/test/Sema/c89.c
index a784722..a5855b2 100644
--- a/test/Sema/c89.c
+++ b/test/Sema/c89.c
@@ -1,6 +1,6 @@
/* RUN: clang %s -std=c89 -pedantic -parse-ast-check
*/
-void foo() {
+void test1() {
{
int i;
i = i + 1;
@@ -18,5 +18,9 @@
}
}
-long long x; /* expected-warning {{extension}} */
+long long test2; /* expected-warning {{extension}} */
+
+void test3(int i) {
+ int A[i]; /* expected-warning {{variable length array}} */
+}