]> granicus.if.org Git - clang/commitdiff
Switch on SemaInit; this makes some code in SemaDecl dead, but I'll give
authorEli Friedman <eli.friedman@gmail.com>
Mon, 19 May 2008 20:29:35 +0000 (20:29 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 19 May 2008 20:29:35 +0000 (20:29 +0000)
it a few days to make sure there aren't any significant regressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51273 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp
test/Sema/array-init.c

index 26fbafdd408987ddbd6484550e04768399de785d..e2739159223ea6202a64db94deaa507ae6da49af 100644 (file)
@@ -770,7 +770,7 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType) {
 
     return CheckSingleInitializer(Init, DeclType);
   }
-#if 1
+#if 0
   unsigned newIndex = 0;
   return CheckInitializerListTypes(InitList, DeclType, true, newIndex);
 #else
index 56be42c695f0b9a4dec7f97c01f0f360118cac1e..2ddd2459351e78653ab7f4fbc136b860dcb95551 100644 (file)
@@ -205,6 +205,6 @@ struct bittest{int : 31, a, :21, :12, b;};
 struct bittest bittestvar = {1, 2, 3, 4}; //expected-warning{{excess elements in array initializer}}
 
 // Not completely sure what should happen here...
-int u1 = {}; //expected-warning{{use of GNU empty initializer extension}} expected-warning{{braces around scalar initializer}}
-int u2 = {{3}}; //expected-warning{{braces around scalar initializer}}
+int u1 = {}; //expected-warning{{use of GNU empty initializer extension}} expected-error{{scalar initializer cannot be empty}}
+int u2 = {{3}}; //expected-error{{too many braces around scalar initializer}}