[clang] [NFC] Format TokenKey enum (PR #101700)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 09:01:37 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 8bfa089e5bfb9f26e05b9cefa9065ca7f97406ce be425ea61ed9b45839e5dff517797cd1c1e42c5a --extensions cpp -- clang/lib/Basic/IdentifierTable.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index 81e7e6d3fc..9cf081e9e2 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -82,47 +82,47 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
 namespace {
 
 enum TokenKey : unsigned {
-  KEYC99        = 0x1,
-  KEYCXX        = 0x2,
-  KEYCXX11      = 0x4,
-  KEYGNU        = 0x8,
-  KEYMS         = 0x10,
-  BOOLSUPPORT   = 0x20,
-  KEYALTIVEC    = 0x40,
-  KEYNOCXX      = 0x80,
-  KEYBORLAND    = 0x100,
-  KEYOPENCLC    = 0x200,
-  KEYC23        = 0x400,
-  KEYNOMS18     = 0x800,
-  KEYNOOPENCL   = 0x1000,
-  WCHARSUPPORT  = 0x2000,
-  HALFSUPPORT   = 0x4000,
-  CHAR8SUPPORT  = 0x8000,
-  KEYOBJC       = 0x10000,
-  KEYZVECTOR    = 0x20000,
+  KEYC99 = 0x1,
+  KEYCXX = 0x2,
+  KEYCXX11 = 0x4,
+  KEYGNU = 0x8,
+  KEYMS = 0x10,
+  BOOLSUPPORT = 0x20,
+  KEYALTIVEC = 0x40,
+  KEYNOCXX = 0x80,
+  KEYBORLAND = 0x100,
+  KEYOPENCLC = 0x200,
+  KEYC23 = 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,
-  KEYHLSL       = 0x2000000,
+  KEYMODULES = 0x80000,
+  KEYCXX20 = 0x100000,
+  KEYOPENCLCXX = 0x200000,
+  KEYMSCOMPAT = 0x400000,
+  KEYSYCL = 0x800000,
+  KEYCUDA = 0x1000000,
+  KEYHLSL = 0x2000000,
   KEYFIXEDPOINT = 0x4000000,
-  KEYMAX        = KEYFIXEDPOINT, // The maximum key
+  KEYMAX = KEYFIXEDPOINT, // The maximum key
   KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
-  KEYALL = (KEYMAX | (KEYMAX-1)) & ~KEYNOMS18 &
+  KEYALL = (KEYMAX | (KEYMAX - 1)) & ~KEYNOMS18 &
            ~KEYNOOPENCL // KEYNOMS18 and KEYNOOPENCL are used to exclude.
 };
 
 /// How a keyword is treated in the selected standard. This enum is ordered
 /// intentionally so that the value that 'wins' is the most 'permissive'.
 enum KeywordStatus {
-  KS_Unknown,     // Not yet calculated. Used when figuring out the status.
-  KS_Disabled,    // Disabled
-  KS_Future,      // Is a keyword in future standard
-  KS_Extension,   // Is an extension
-  KS_Enabled,     // Enabled
+  KS_Unknown,   // Not yet calculated. Used when figuring out the status.
+  KS_Disabled,  // Disabled
+  KS_Future,    // Is a keyword in future standard
+  KS_Extension, // Is an extension
+  KS_Enabled,   // Enabled
 };
 
 } // namespace

``````````

</details>


https://github.com/llvm/llvm-project/pull/101700


More information about the cfe-commits mailing list