[cfe-commits] r51273 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/array-init.c
Eli Friedman
eli.friedman at gmail.com
Mon May 19 13:29:35 PDT 2008
Author: efriedma
Date: Mon May 19 15:29:35 2008
New Revision: 51273
URL: http://llvm.org/viewvc/llvm-project?rev=51273&view=rev
Log:
Switch on SemaInit; this makes some code in SemaDecl dead, but I'll give
it a few days to make sure there aren't any significant regressions.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/test/Sema/array-init.c
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=51273&r1=51272&r2=51273&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Mon May 19 15:29:35 2008
@@ -770,7 +770,7 @@
return CheckSingleInitializer(Init, DeclType);
}
-#if 1
+#if 0
unsigned newIndex = 0;
return CheckInitializerListTypes(InitList, DeclType, true, newIndex);
#else
Modified: cfe/trunk/test/Sema/array-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/array-init.c?rev=51273&r1=51272&r2=51273&view=diff
==============================================================================
--- cfe/trunk/test/Sema/array-init.c (original)
+++ cfe/trunk/test/Sema/array-init.c Mon May 19 15:29:35 2008
@@ -205,6 +205,6 @@
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}}
More information about the cfe-commits
mailing list