Skip to content
Permalink
Browse files
Don't parse top-level comma operators in arrow lambdas
  • Loading branch information
mortie committed Jan 27, 2020
1 parent e4726dc commit c653318c0056d06a512dfce0799b66032edbed4c
Showing with 1 addition and 1 deletion.
  1. +1 −1 clang/lib/Parse/ParseExprCXX.cpp
@@ -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();

0 comments on commit c653318

Please sign in to comment.