More progress on array initializers.

- Added Expr::isConstantExpr().
- Added type checking for InitListExpr elements.
- Added diagnostic for trying to initialize a variable sized object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41674 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 713ddb4..8788c2f 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -649,7 +649,9 @@
   // doing the semantic analysis will likely be located elsewhere (i.e. in 
   // consumers of InitListExpr (e.g. ParseDeclarator, ParseCompoundLiteral).
   
-  return new InitListExpr(LBraceLoc, InitList, NumInit, RBraceLoc);
+  InitListExpr *e = new InitListExpr(LBraceLoc, InitList, NumInit, RBraceLoc);
+  e->setType(Context.VoidTy); // FIXME: just a place holder for now.
+  return e;
 }
 
 Action::ExprResult Sema::