]> granicus.if.org Git - clang/commitdiff
[SemaExpr] Re-enable missing assertion.
authorDavide Italiano <davide@freebsd.org>
Wed, 19 Aug 2015 02:21:12 +0000 (02:21 +0000)
committerDavide Italiano <davide@freebsd.org>
Wed, 19 Aug 2015 02:21:12 +0000 (02:21 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245404 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index dd99ad2f0c0965b99ec76f823ec2dd7e21b83376..0d3913448f3e8cbe2874dce63206b54aff05a3d8 100644 (file)
@@ -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);