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.
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.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits