r245404 - [SemaExpr] Re-enable missing assertion.

Davide Italiano via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 18 19:21:12 PDT 2015


Author: davide
Date: Tue Aug 18 21:21:12 2015
New Revision: 245404

URL: http://llvm.org/viewvc/llvm-project?rev=245404&view=rev
Log:
[SemaExpr] Re-enable missing assertion.

This has been disabled for a long time, but:
1) Initializers work (and apparently they're re reason why this was disabled).
2) various tests happen to hit this code path and the invariant seems to be
always verified.

Differential Revision:	http://reviews.llvm.org/D12110
Reviewed by:	rsmith

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=245404&r1=245403&r2=245404&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Aug 18 21:21:12 2015
@@ -5085,8 +5085,7 @@ ExprResult
 Sema::ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty,
                            SourceLocation RParenLoc, Expr *InitExpr) {
   assert(Ty && "ActOnCompoundLiteral(): missing type");
-  // FIXME: put back this assert when initializers are worked out.
-  //assert((InitExpr != 0) && "ActOnCompoundLiteral(): missing expression");
+  assert(InitExpr && "ActOnCompoundLiteral(): missing expression");
 
   TypeSourceInfo *TInfo;
   QualType literalType = GetTypeFromParser(Ty, &TInfo);




More information about the cfe-commits mailing list