[cfe-commits] r44605 - /cfe/trunk/Sema/SemaExpr.cpp
Anders Carlsson
andersca at mac.com
Tue Dec 4 23:24:21 PST 2007
Author: andersca
Date: Wed Dec 5 01:24:19 2007
New Revision: 44605
URL: http://llvm.org/viewvc/llvm-project?rev=44605&view=rev
Log:
Add sema checking for compound literal expressions.
Modified:
cfe/trunk/Sema/SemaExpr.cpp
Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=44605&r1=44604&r2=44605&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Wed Dec 5 01:24:19 2007
@@ -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);
}
More information about the cfe-commits
mailing list