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

Richard Sandiford via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 09:40:13 PDT 2023


rsandifo-arm marked an inline comment as done.
rsandifo-arm added inline comments.


================
Comment at: clang/include/clang/Basic/TokenKinds.h:106
+#include "clang/Basic/AttrTokenKinds.inc"
+#undef KEYWORD
+  );
----------------
erichkeane wrote:
> Does AttrTokenKinds.inc not do this undef for you?  Most of our tablegen'ed/.td files tend to...
> 
> Edit now that I've gone through the whole patch:
> 
> I see the inclusion into TokenKinds.def makes adding one a pain, but I suggest instead making these be KEYWORD_ATTRIBUTE(...), with all the 'fixings' that comes in TokenKinds.def (see the defines at the top), and then including TokenKinds.def here instead.
Ah, yeah, that's neater, thanks.  It also means that the KEYALL can be moved to TokenKinds.def until such time (hopefully never) as it becomes necessary to vary it based on attribute.

Done in the updated version.


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