llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Cyrus Ding (dingcyrus) <details> <summary>Changes</summary> [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 --- Full diff: https://github.com/llvm/llvm-project/pull/207132.diff 2 Files Affected: - (modified) clang/include/clang/Basic/IdentifierTable.h (+2-3) - (modified) clang/lib/Basic/IdentifierTable.cpp (-3) ``````````diff 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) { `````````` </details> https://github.com/llvm/llvm-project/pull/207132 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
