[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 20:24:07 PST 2021


rjmccall added a comment.

Without bothering to look it up, I would guess that the attribute-parsing code used to generically handle the ambiguity between identifier expressions and identifier attribute arguments by just always parsing simple identifiers as identifier arguments, making it Sema's responsibility to turn that back into an expression.  At some point, the parser was made sensitive to the actual attribute being parsed, but we never bothered to simplify Sema.  At any rate, the parser does now know exactly which argument of which attribute it's parsing, so there's zero reason for it to force this complexity on Sema anymore; if we find a case that parses identifier arguments, we should fix it in the parser to parse an expression instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94092/new/

https://reviews.llvm.org/D94092



More information about the cfe-commits mailing list