https://github.com/dingcyrus created 
https://github.com/llvm/llvm-project/pull/207132

  [Clang] Remove unused TokenKey::KEYNOZOS

  KEYNOZOS was defined as a TokenKey flag to mark keywords not supported
  on z/OS, but no keyword in TokenKinds.def actually uses it. This patch
  removes the unused enum value and its associated handling code.

  Build: `ninja clang` succeeded (2923/2923 targets).
  Tests: `ninja check-clang` passed — 51180 passed, 0 failed.

  Fixes #206877

>From 82d2e6af1508d3c425b2a3f214788265da7711f4 Mon Sep 17 00:00:00 2001
From: Chenguang Ding <[email protected]>
Date: Thu, 2 Jul 2026 14:28:26 +0800
Subject: [PATCH] [Clang] Remove unused TokenKey::KEYNOZOS

  KEYNOZOS was defined as a TokenKey flag to mark keywords not supported
  on z/OS, but no keyword in TokenKinds.def actually uses it. This patch
  removes the unused enum value and its associated handling code.

  Fixes #206877
---
 clang/include/clang/Basic/IdentifierTable.h | 5 ++---
 clang/lib/Basic/IdentifierTable.cpp         | 3 ---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/clang/include/clang/Basic/IdentifierTable.h 
b/clang/include/clang/Basic/IdentifierTable.h
index 9e80c3fb7079d..5aff13a339bd9 100644
--- a/clang/include/clang/Basic/IdentifierTable.h
+++ b/clang/include/clang/Basic/IdentifierTable.h
@@ -74,15 +74,14 @@ enum TokenKey : unsigned {
   KEYSYCL = 0x800000,
   KEYCUDA = 0x1000000,
   KEYZOS = 0x2000000,
-  KEYNOZOS = 0x4000000,
   KEYHLSL = 0x8000000,
   KEYFIXEDPOINT = 0x10000000,
   KEYDEFERTS = 0x20000000,
   KEYNOHLSL = 0x40000000,
   KEYMAX = KEYNOHLSL, // The maximum key
   KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
-  KEYALL = (KEYMAX | (KEYMAX - 1)) & ~KEYNOMS18 & ~KEYNOOPENCL & ~KEYNOZOS &
-           ~KEYNOHLSL // KEYNOMS18, KEYNOOPENCL, KEYNOZOS, KEYNOHLSL excluded.
+  KEYALL = (KEYMAX | (KEYMAX - 1)) & ~KEYNOMS18 & ~KEYNOOPENCL &
+           ~KEYNOHLSL // KEYNOMS18, KEYNOOPENCL, KEYNOHLSL excluded.
 };
 
 /// How a keyword is treated in the selected standard. This enum is ordered
diff --git a/clang/lib/Basic/IdentifierTable.cpp 
b/clang/lib/Basic/IdentifierTable.cpp
index a2e9316e4e372..68cd02a623351 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -159,7 +159,6 @@ static KeywordStatus getKeywordStatusHelper(const 
LangOptions &LangOpts,
     return LangOpts.CPlusPlus ? KS_Unknown : KS_Enabled;
   case KEYNOOPENCL:
   case KEYNOMS18:
-  case KEYNOZOS:
   case KEYNOHLSL:
     // The disable behavior for this is handled in getKeywordStatus.
     return KS_Unknown;
@@ -184,8 +183,6 @@ KeywordStatus clang::getKeywordStatus(const LangOptions 
&LangOpts,
   if (LangOpts.MSVCCompat && (Flags & KEYNOMS18) &&
       !LangOpts.isCompatibleWithMSVC(LangOptions::MSVC2015))
     return KS_Disabled;
-  if (LangOpts.ZOSExt && (Flags & KEYNOZOS))
-    return KS_Disabled;
   KeywordStatus CurStatus = KS_Unknown;
 
   while (Flags != 0) {

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to