[clang] be19952 - Fix the lldb test bots
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 26 08:19:55 PDT 2022
Author: Aaron Ballman
Date: 2022-08-26T11:19:42-04:00
New Revision: be199527205dc8a8c7febc057ad6be90fac15547
URL: https://github.com/llvm/llvm-project/commit/be199527205dc8a8c7febc057ad6be90fac15547
DIFF: https://github.com/llvm/llvm-project/commit/be199527205dc8a8c7febc057ad6be90fac15547.diff
LOG: Fix the lldb test bots
This addresses an accidental change in behavior from
41667a8b9b624e282e7c08fadf7091223728d1c1 to get the bots back to green.
However, I think there's an issue with LLDB assuming it's valid to
enable support for keywords in language modes that don't support the
keyword (as other parts of Clang are not expecting to be able to do
that).
This should fix (and others):
https://lab.llvm.org/buildbot/#/builders/68/builds/38374
Added:
Modified:
clang/include/clang/Basic/TokenKinds.def
clang/lib/Basic/IdentifierTable.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def
index 729442a79f05..f6a16cc019de 100644
--- a/clang/include/clang/Basic/TokenKinds.def
+++ b/clang/include/clang/Basic/TokenKinds.def
@@ -330,7 +330,7 @@ KEYWORD(__objc_no , KEYALL)
// C++ 2.11p1: Keywords.
KEYWORD(asm , KEYCXX|KEYGNU)
-KEYWORD(bool , KEYCXX|KEYOPENCLC|KEYOPENCLCXX|KEYC2X)
+KEYWORD(bool , BOOLSUPPORT|KEYC2X)
KEYWORD(catch , KEYCXX)
KEYWORD(class , KEYCXX)
KEYWORD(const_cast , KEYCXX)
@@ -338,7 +338,7 @@ KEYWORD(delete , KEYCXX)
KEYWORD(dynamic_cast , KEYCXX)
KEYWORD(explicit , KEYCXX)
KEYWORD(export , KEYCXX)
-KEYWORD(false , KEYCXX|KEYOPENCLC|KEYOPENCLCXX|KEYC2X)
+KEYWORD(false , BOOLSUPPORT|KEYC2X)
KEYWORD(friend , KEYCXX)
KEYWORD(mutable , KEYCXX)
KEYWORD(namespace , KEYCXX)
@@ -352,7 +352,7 @@ KEYWORD(static_cast , KEYCXX)
KEYWORD(template , KEYCXX)
KEYWORD(this , KEYCXX)
KEYWORD(throw , KEYCXX)
-KEYWORD(true , KEYCXX|KEYOPENCLC|KEYOPENCLCXX|KEYC2X)
+KEYWORD(true , BOOLSUPPORT|KEYC2X)
KEYWORD(try , KEYCXX)
KEYWORD(typename , KEYCXX)
KEYWORD(typeid , KEYCXX)
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index 3940d4bc5de3..2035ca2f7ce1 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -89,25 +89,26 @@ namespace {
KEYCXX11 = 0x4,
KEYGNU = 0x8,
KEYMS = 0x10,
- KEYALTIVEC = 0x20,
- KEYNOCXX = 0x40,
- KEYBORLAND = 0x80,
- KEYOPENCLC = 0x100,
- KEYC2X = 0x200,
- KEYNOMS18 = 0x400,
- KEYNOOPENCL = 0x800,
- WCHARSUPPORT = 0x1000,
- HALFSUPPORT = 0x2000,
- CHAR8SUPPORT = 0x4000,
- KEYOBJC = 0x8000,
- KEYZVECTOR = 0x10000,
- KEYCOROUTINES = 0x20000,
- KEYMODULES = 0x40000,
- KEYCXX20 = 0x80000,
- KEYOPENCLCXX = 0x100000,
- KEYMSCOMPAT = 0x200000,
- KEYSYCL = 0x400000,
- KEYCUDA = 0x800000,
+ BOOLSUPPORT = 0x20,
+ KEYALTIVEC = 0x40,
+ KEYNOCXX = 0x80,
+ KEYBORLAND = 0x100,
+ KEYOPENCLC = 0x200,
+ KEYC2X = 0x400,
+ KEYNOMS18 = 0x800,
+ KEYNOOPENCL = 0x1000,
+ WCHARSUPPORT = 0x2000,
+ HALFSUPPORT = 0x4000,
+ CHAR8SUPPORT = 0x8000,
+ KEYOBJC = 0x10000,
+ KEYZVECTOR = 0x20000,
+ KEYCOROUTINES = 0x40000,
+ KEYMODULES = 0x80000,
+ KEYCXX20 = 0x100000,
+ KEYOPENCLCXX = 0x200000,
+ KEYMSCOMPAT = 0x400000,
+ KEYSYCL = 0x800000,
+ KEYCUDA = 0x1000000,
KEYMAX = KEYCUDA, // The maximum key
KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
KEYALL = (KEYMAX | (KEYMAX-1)) & ~KEYNOMS18 &
@@ -161,6 +162,9 @@ static KeywordStatus getKeywordStatusHelper(const LangOptions &LangOpts,
return LangOpts.GNUKeywords ? KS_Extension : KS_Unknown;
case KEYMS:
return LangOpts.MicrosoftExt ? KS_Extension : KS_Unknown;
+ case BOOLSUPPORT:
+ if (LangOpts.Bool) return KS_Enabled;
+ return !LangOpts.CPlusPlus ? KS_Future : KS_Unknown;
case KEYALTIVEC:
return LangOpts.AltiVec ? KS_Enabled : KS_Unknown;
case KEYBORLAND:
More information about the cfe-commits
mailing list