[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 18:14:40 PST 2024
================
@@ -3705,6 +3713,12 @@ bool Parser::ParseExpressionList(SmallVectorImpl<Expr *> &Exprs,
Token Comma = Tok;
ConsumeToken();
checkPotentialAngleBracketDelimiter(Comma);
+
+ if (Tok.is(tok::r_paren)) {
+ if (HasTrailingComma)
+ *HasTrailingComma = true;
+ break;
+ }
----------------
zyn0217 wrote:
We can't handle the 'r_paren' at the caller side i.e. somewhere in ParsePostfixExpressionSuffix()?
https://github.com/llvm/llvm-project/pull/114684
More information about the cfe-commits
mailing list