@@ -13908,8 +13908,9 @@ void Sema::ActOnStmtExprError() {
1390813908 PopExpressionEvaluationContext();
1390913909}
1391013910
13911- ExprResult Sema::ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt,
13912- SourceLocation RPLoc) { // "({..})"
13911+ ExprResult
13912+ Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt,
13913+ SourceLocation RPLoc) { // "({..})"
1391313914 assert(SubStmt && isa<CompoundStmt>(SubStmt) && "Invalid action invocation!");
1391413915 CompoundStmt *Compound = cast<CompoundStmt>(SubStmt);
1391513916
@@ -13938,18 +13939,9 @@ ExprResult Sema::ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt,
1393813939 }
1393913940 }
1394013941
13941- bool IsDependentContext = false;
13942- if (S)
13943- IsDependentContext = S->getTemplateParamParent() != nullptr;
13944- else
13945- // FIXME: This is not correct when substituting inside a templated
13946- // context that isn't a DeclContext (such as a variable template).
13947- IsDependentContext = CurContext->isDependentContext();
13948-
1394913942 // FIXME: Check that expression type is complete/non-abstract; statement
1395013943 // expressions are not lvalues.
13951- Expr *ResStmtExpr =
13952- new (Context) StmtExpr(Compound, Ty, LPLoc, RPLoc, IsDependentContext);
13944+ Expr *ResStmtExpr = new (Context) StmtExpr(Compound, Ty, LPLoc, RPLoc);
1395313945 if (StmtExprMayBindToTemp)
1395413946 return MaybeBindToTemporary(ResStmtExpr);
1395513947 return ResStmtExpr;
0 commit comments