Skip to content

Commit

Permalink
Don't parse top-level comma operators in arrow lambdas
Browse files Browse the repository at this point in the history
  • Loading branch information
mortie committed Jan 27, 2020
1 parent e4726dc commit c653318
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Parse/ParseExprCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
if (Tok.is(tok::fatarrow)) {
SourceLocation ReturnLoc(ConsumeToken());

ExprResult Expr(ParseExpression());
ExprResult Expr(ParseAssignmentExpression());
if (Expr.isInvalid()) {
Actions.ActOnLambdaError(LambdaBeginLoc, getCurScope());
return ExprError();
Expand Down

0 comments on commit c653318

Please sign in to comment.