[PATCH] D148700: [clang] Add support for “regular” keyword attributes

Richard Sandiford via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 16 07:24:52 PDT 2023


rsandifo-arm added a comment.

Hi @aaron.ballman and @erichkeane .  Do you have any more thoughts on this?  In principle, I'm happy to convert an existing attribute over to the new scheme, but in practice, I can't find one that seems to be suitable.  If we're going to do that, I think I'll need guidance as to which attribute to convert.

Alternatively, I could try to classify existing keywords into groups based on their current parsing rules and tablegen-ify them based on that.  E.g. I could add NullabilityKeyword for `_Nonnull`, `_Nullable`, `_Nullable_result`, `_Null_unspecified`, and for anything else that happens to use exactly those parsing rules.  I could then replace direct checks for the nullability keyword tokens with checks for a NullabilityKeyword spelling.

But the tablegen side wasn't really the main focus of this.  It's more the principle of having an optional, mechanical link between attribute keywords and the standard attribute parsing rules.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148700



More information about the cfe-commits mailing list