Add sema checking for compound literal expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44605 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index f53980c..b08695f 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -686,8 +686,11 @@
   // FIXME: put back this assert when initializers are worked out.
   //assert((InitExpr != 0) && "ActOnCompoundLiteral(): missing expression");
   Expr *literalExpr = static_cast<Expr*>(InitExpr);
-  
-  // FIXME: add semantic analysis (C99 6.5.2.5).
+
+  // FIXME: add more semantic analysis (C99 6.5.2.5).
+  if (CheckInitializer(literalExpr, literalType, false))
+    return 0;
+
   return new CompoundLiteralExpr(literalType, literalExpr);
 }