Skip to content

[NFC] Format TokenKey enum #101700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

abhina-sree
Copy link
Contributor

@abhina-sree abhina-sree commented Aug 2, 2024

This is to fix the suggested formatting fix seen here #101696

@abhina-sree abhina-sree self-assigned this Aug 2, 2024
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Aug 2, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 2, 2024

@llvm/pr-subscribers-clang

Author: Abhina Sree (abhina-sree)

Changes

This is to fix the suggested formatting fix seen here #96063


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

1 Files Affected:

  • (modified) clang/lib/Basic/IdentifierTable.cpp (+43-43)
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index 4f7ccaf4021d6..81e7e6d3fcfda 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -81,49 +81,49 @@ IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
 // Constants for TokenKinds.def
 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,
-    KEYCOROUTINES = 0x40000,
-    KEYMODULES    = 0x80000,
-    KEYCXX20      = 0x100000,
-    KEYOPENCLCXX  = 0x200000,
-    KEYMSCOMPAT   = 0x400000,
-    KEYSYCL       = 0x800000,
-    KEYCUDA       = 0x1000000,
-    KEYHLSL       = 0x2000000,
-    KEYFIXEDPOINT = 0x4000000,
-    KEYMAX        = KEYFIXEDPOINT, // The maximum key
-    KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
-    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
-  };
+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,
+  KEYCOROUTINES = 0x40000,
+  KEYMODULES    = 0x80000,
+  KEYCXX20      = 0x100000,
+  KEYOPENCLCXX  = 0x200000,
+  KEYMSCOMPAT   = 0x400000,
+  KEYSYCL       = 0x800000,
+  KEYCUDA       = 0x1000000,
+  KEYHLSL       = 0x2000000,
+  KEYFIXEDPOINT = 0x4000000,
+  KEYMAX        = KEYFIXEDPOINT, // The maximum key
+  KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
+  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
+};
 
 } // namespace
 

Copy link

github-actions bot commented Aug 2, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@zibi2 zibi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abhina-sree abhina-sree merged commit fc66eaa into llvm:main Aug 7, 2024
7 checks passed
@abhina-sree abhina-sree deleted the abhina/nfc_format branch August 7, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants