[PATCH] D125396: [clang] Fix KEYALL

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 11 08:46:39 PDT 2022


yaxunl created this revision.
yaxunl added reviewers: delcypher, aaron.ballman, tra, rsmith.
Herald added a project: All.
yaxunl requested review of this revision.

Introduce KEYMAX and a generic way to update KEYALL.


https://reviews.llvm.org/D125396

Files:
  clang/lib/Basic/IdentifierTable.cpp


Index: clang/lib/Basic/IdentifierTable.cpp
===================================================================
--- clang/lib/Basic/IdentifierTable.cpp
+++ clang/lib/Basic/IdentifierTable.cpp
@@ -109,9 +109,10 @@
     KEYMSCOMPAT   = 0x800000,
     KEYSYCL       = 0x1000000,
     KEYCUDA       = 0x2000000,
+    KEYMAX        = KEYCUDA, // The maximum key
     KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
-    KEYALL = (0x1ffffff & ~KEYNOMS18 &
-              ~KEYNOOPENCL) // KEYNOMS18 and KEYNOOPENCL are used to exclude.
+    KEYALL = (KEYMAX | (KEYMAX-1)) & ~KEYNOMS18 &
+             ~KEYNOOPENCL // KEYNOMS18 and KEYNOOPENCL are used to exclude.
   };
 
   /// How a keyword is treated in the selected standard.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125396.428682.patch
Type: text/x-patch
Size: 716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220511/3f544334/attachment.bin>


More information about the cfe-commits mailing list