PR3009: Get rid of bogus warning for scalar compound literals.

This patch isn't quite ideal in that it eliminates the warning for 
constructs like "int a = {1};", where the braces are in fact redundant.  
However, that would have required a bunch of refactoring, and it's 
much less likely to cause confusion compared to redundant nested braces.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71939 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index 4e95a01..dfaaa87 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -20,7 +20,7 @@
 
   int x3[x] = { 1, 2 }; // expected-error{{variable-sized object may not be initialized}}
 
-  int x4 = { 1, 2 }; // expected-warning{{braces around scalar initializer}} expected-warning{{excess elements in scalar initializer}}
+  int x4 = { 1, 2 }; // expected-warning{{excess elements in scalar initializer}}
 
   int y[4][3] = { 
     { 1, 3, 5 },
diff --git a/test/Sema/compound-literal.c b/test/Sema/compound-literal.c
index 24ec223..b51bcfe 100644
--- a/test/Sema/compound-literal.c
+++ b/test/Sema/compound-literal.c
@@ -6,7 +6,7 @@
 static struct foo t2 = {0,0}; 
 static struct foo t3 = t2; // -expected-error {{initializer element is not a compile-time constant}}
 static int *p = (int []){2,4}; 
-static int x = (int){1}; // -expected-warning{{braces around scalar initializer}}
+static int x = (int){1};
 
 static int *p2 = (int []){2,x}; // -expected-error {{initializer element is not a compile-time constant}}
 static long *p3 = (long []){2,"x"}; // -expected-warning {{incompatible pointer to integer conversion initializing 'char [2]', expected 'long'}}