[PATCH] D114439: [Annotation] Allow parameter pack expansions in annotate attribute
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 7 05:56:34 PST 2021
erichkeane added inline comments.
================
Comment at: clang/lib/Parse/ParseDecl.cpp:447
Actions.CorrectDelayedTyposInExpr(ParseAssignmentExpression()));
+
+ if (Tok.is(tok::ellipsis)) {
----------------
So I was thinking about this overnight... I wonder if this logic is inverted here? Aaron can better answer, but I wonder if we should be instead detecting when we are on the 'last' parameter and it is one of these `VariadicExprArgument` things (that accept a pack), then dropping the parser into a loop of:
while (Tok.is(tok::comma)){
Tok.Consume();
ArgExpr = CorrectTypos(ParseAssignmentExpr(...));
}
// finally, consume the closing paren.
WDYT?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114439/new/
https://reviews.llvm.org/D114439
More information about the cfe-commits
mailing list