summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Sema/SemaExpr.cpp')
-rw-r--r--clang/Sema/SemaExpr.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp
index f53980ca906..b08695ff76f 100644
--- a/clang/Sema/SemaExpr.cpp
+++ b/clang/Sema/SemaExpr.cpp
@@ -686,8 +686,11 @@ ActOnCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty,
// 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);
}
OpenPOWER on IntegriCloud