aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2022-05-11 11:41:46 -0400
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2022-05-11 14:28:08 -0400
commit84db35594953a6f7aff7cbc007f1c5d2fd35b1a9 (patch)
treee58c4bfed0d686211019fe371b12f1ea40e96950 /clang/lib/Basic/IdentifierTable.cpp
parent4dae38ebfba0d8583e52c3ded8f62f5f9fa77fda (diff)
downloadllvm-84db35594953a6f7aff7cbc007f1c5d2fd35b1a9.zip
llvm-84db35594953a6f7aff7cbc007f1c5d2fd35b1a9.tar.gz
llvm-84db35594953a6f7aff7cbc007f1c5d2fd35b1a9.tar.bz2
[clang] Fix KEYALL
Update KEYALL to cover KEYCUDA. Introduce KEYMAX and a generic way to update KEYALL. Reviewed by: Dan Liew Differential Revision: https://reviews.llvm.org/D125396
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r--clang/lib/Basic/IdentifierTable.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index af19de4..82cee4a 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -109,9 +109,10 @@ namespace {
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.