More fun with initializers!
- Fixed many bugs, enhanced test case considerably, added a diagnostic, etc.
- Refactored CheckInitList() into CheckVariableInitList()/CheckConstantInitList().
- Added CheckInitExpr().
- Support for multi-dimensional arrays looking good.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41690 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.h b/Sema/Sema.h
index 0979c60..ff3ec1b 100644
--- a/Sema/Sema.h
+++ b/Sema/Sema.h
@@ -445,9 +445,14 @@
bool CheckInitializer(Expr *simpleInit_or_initList, QualType &declType,
bool isStatic);
bool CheckSingleInitializer(Expr *simpleInit, QualType declType);
- void CheckInitList(InitListExpr *IList, QualType DType, bool isStatic,
- int &nInitializers, int maxElements, bool &hadError);
-
+ bool CheckInitExpr(Expr *expr, bool isStatic, QualType ElementType);
+ void CheckVariableInitList(QualType DeclType, InitListExpr *IList,
+ QualType ElementType, bool isStatic,
+ int &nInitializers, bool &hadError);
+ void CheckConstantInitList(QualType DeclType, InitListExpr *IList,
+ QualType ElementType, bool isStatic,
+ int &nInitializers, bool &hadError);
+
/// ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have
/// the specified width and sign. If an overflow occurs, detect it and emit
/// the specified diagnostic.