Removed Sema::VerifyConstantArrayType(). With the new Array/ConstantArray/VariableArray nodes, this
routine was causing more trouble than it was worth. Anders/Chris noticed that it could return an error code
without emiting a diagnostic (which results in an silent invalid decl, which should *never* happen). In addition,
this routine didn't work well for typedefs and field decls. Lastly, it didn't consider that initializers aren't
in place yet.

Added Type::getAsConstantArrayType(), Type::getAsVariableArrayType(), Type::getAsVariablyModifiedType(),
and Type::isVariablyModifiedType();

Modified Sema::ParseDeclarator() and Sema::ParseField() to use the new predicates. Also added a FIXME for
the initializer omission. Also added a missing test for "static" @ file scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41647 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/array-constraint.c b/test/Sema/array-constraint.c
index 1ca3cd7..867d4e7 100644
--- a/test/Sema/array-constraint.c
+++ b/test/Sema/array-constraint.c
@@ -39,3 +39,13 @@
   int zero_size[0]; // expected-warning{{zero size arrays are an extension}}
 }
 
+static int I;
+typedef int TA[I]; // expected-error {{variable length array declared outside of any function}}
+
+void strFunc(char *);
+const char staticAry[] = "test";
+int checkStaticAry() { 
+  strFunc(staticAry); // expected-warning{{passing 'char const []' to 'char *' discards qualifiers}}
+}
+
+