diff options
author | Steve Naroff <snaroff@apple.com> | 2008-05-01 22:18:59 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-05-01 22:18:59 +0000 |
commit | 0cca749f64ff54476df3a4fc084821b8a8d712d5 (patch) | |
tree | 6a7d189456cd657af44b6c1e05716d63155b1247 /lib/Sema/SemaDecl.cpp | |
parent | 8ba5d792032f475eb653ca6340eb51068df0fa90 (diff) |
Replace Sema::CheckInitializerListTypes() with a helper class (InitListChecker) that synthesizes implicit InitListExpr's when appropriate (see InitListExpr comments in Expr.h for more details). I also moved the code to SemaInit.cpp, to help reduce clutter in SemaDecl.cpp.
NOTE: This work is incomplete and still fails many tests (as a result, it isn't enabled yet). Nevertheless, I wanted to check it in so I can work on it from home.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index be14341513..ada6ceb68a 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -730,8 +730,13 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType) { return CheckSingleInitializer(Init, DeclType); } +#if 1 unsigned newIndex = 0; return CheckInitializerListTypes(InitList, DeclType, true, newIndex); +#else + InitListChecker CheckInitList(this, InitList, DeclType); + return CheckInitList.HadError(); +#endif } Sema::DeclTy * |