Finish getting "array-init.c" to work properly.

Array scalar initialization is now is reasonable shape.

Next step, structure and array of structure initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41681 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index 209b734..20daa45 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -7,16 +7,16 @@
 
 extern int fileScopeExtern[3] = { 1, 3, 5 }; // expected-warning{{'extern' variable has an initializer}}
 
-static int ary3[] = { 1, "abc", 3 }; // expected-warning{{incompatible types assigning 'char *' to 'int'}}
+static int ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible types assigning 'char *' to 'int'}}
 
 void func() {
   int x = 1;
 
-  //int x2[] = { 1, 3, 5 };
+  int xComputeSize[] = { 1, 3, 5 };
 
   int x3[x] = { 1, 2 }; // expected-error{{variable-sized object may not be initialized}}
 
-  int x4 = { 1, 2 }; // gcc-warning {{excess elements in array initializer}}
+  int x4 = { 1, 2 }; // // expected-warning{{excess elements in array initializer}}
 
   int y[4][3] = { 
     { 1, 3, 5 },
@@ -28,6 +28,14 @@
     1, 3, 5, 2, 4, 6, 3, 5, 7
   };
 
+  int y3[4][3] = {  
+    { 1, 3, 5 },
+    { 2, 4, 6 },
+    { 3, 5, 7 },
+    { 4, 6, 8 },
+    { 5 }, // expected-warning{{excess elements in array initializer}}
+  };
+
   struct threeElements {
     int a,b,c;
   } z = { 1 };