More semantic analysis of initializers.
Added 2 errors and one warning, updated test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41672 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.h b/Sema/Sema.h
index e99e332..38c11a0 100644
--- a/Sema/Sema.h
+++ b/Sema/Sema.h
@@ -30,6 +30,7 @@
class Preprocessor;
class Decl;
class Expr;
+ class InitListExpr;
class VarDecl;
class ParmVarDecl;
class TypedefDecl;
@@ -441,8 +442,10 @@
IdentifierInfo &Comp, SourceLocation CmpLoc);
/// type checking declaration initializers (C99 6.7.8)
- QualType CheckInitializer(Expr *simpleInit_or_initList, QualType declType);
+ QualType CheckInitializer(Expr *simpleInit_or_initList, QualType declType,
+ bool isStatic);
bool CheckSingleInitializer(Expr *simpleInit, QualType declType);
+ bool RequireConstantExprs(InitListExpr *IList);
/// ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have
/// the specified width and sign. If an overflow occurs, detect it and emit