diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-05-19 20:29:35 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-05-19 20:29:35 +0000 |
commit | c56c977f44d0bd8422a6f0fe87f361cbb728c06b (patch) | |
tree | 224168400672e4f7490aa24b6ba1ebdc0aee6e93 | |
parent | cda25a977e4b7fe4e080b87586410eaeab7b62f6 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51273 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 | ||||
-rw-r--r-- | test/Sema/array-init.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 26fbafdd40..e273915922 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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 diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index 56be42c695..2ddd245935 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -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}} |