Fix for PR3663/3669: use TryToFixInvalidVariablyModifiedType for
variable declarations where applicable. Also, a few fixes to
TryToFixInvalidVariablyModifiedType for issues that this exposed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65500 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/vla.c b/test/Sema/vla.c
index 30c20bd..74ac134 100644
--- a/test/Sema/vla.c
+++ b/test/Sema/vla.c
@@ -1,4 +1,4 @@
-// RUN: clang %s -verify -fsyntax-only
+// RUN: clang %s -verify -fsyntax-only -pedantic
int test1() {
typedef int x[test1()]; // vla
@@ -41,3 +41,5 @@
static int (*d)[i];
}
+// PR3663
+static const unsigned array[((2 * (int)((((4) / 2) + 1.0/3.0) * (4) - 1e-8)) + 1)]; // expected-warning {{size of static array must be an integer constant expression}}