diff options
Diffstat (limited to 'clang/lib/Parse')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/ParseExprCXX.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 11 |
3 files changed, 6 insertions, 9 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index f3316461ac0..490bd5ada62 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1048,7 +1048,7 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, SourceLocation CoawaitLoc = ConsumeToken(); Res = ParseCastExpression(false); if (!Res.isInvalid()) - Res = Actions.ActOnCoawaitExpr(CoawaitLoc, Res.get()); + Res = Actions.ActOnCoawaitExpr(getCurScope(), CoawaitLoc, Res.get()); return Res; } diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index bd9b9f97313..d5f188104ed 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/lib/Parse/ParseExprCXX.cpp @@ -1568,7 +1568,7 @@ ExprResult Parser::ParseCoyieldExpression() { SourceLocation Loc = ConsumeToken(); ExprResult Expr = ParseAssignmentExpression(); if (!Expr.isInvalid()) - Expr = Actions.ActOnCoyieldExpr(Loc, Expr.get()); + Expr = Actions.ActOnCoyieldExpr(getCurScope(), Loc, Expr.get()); return Expr; } diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index af7008f8e78..35cb0fef781 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -1691,13 +1691,10 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) { StmtResult ForEachStmt; if (ForRange) { - ForRangeStmt = Actions.ActOnCXXForRangeStmt(ForLoc, CoawaitLoc, - FirstPart.get(), - ForRangeInit.ColonLoc, - ForRangeInit.RangeExpr.get(), - T.getCloseLocation(), - Sema::BFRK_Build); - + ForRangeStmt = Actions.ActOnCXXForRangeStmt( + getCurScope(), ForLoc, CoawaitLoc, FirstPart.get(), + ForRangeInit.ColonLoc, ForRangeInit.RangeExpr.get(), + T.getCloseLocation(), Sema::BFRK_Build); // Similarly, we need to do the semantic analysis for a for-range // statement immediately in order to close over temporaries correctly. |

