Fix a crasher that Neil reported: Sema::GetTypeForDeclarator should never 
return a null type.  If there is an error parsing the type, pick a new type
for error recovery purposes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40029 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/array-constraint.c b/test/Sema/array-constraint.c
new file mode 100644
index 0000000..4b70bb9
--- /dev/null
+++ b/test/Sema/array-constraint.c
@@ -0,0 +1,11 @@
+// RUN: clang -parse-ast-check %s
+
+struct s; 
+struct s* t (struct s z[]) {   // expected-error {{array has incomplete element type}}
+  return z; 
+}
+
+void *k (void l[2]) {          // expected-error {{array has incomplete element type}}
+  return l; 
+}
+