[clang] [clang-format] modified goto bool to enum (PR #65140)

Devansh Varshney देवांश वार्ष्णेय via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 4 12:30:24 PDT 2023


================
@@ -2421,20 +2421,28 @@ struct FormatStyle {
 
   /// Indent goto labels.
   ///
-  /// When ``false``, goto labels are flushed left.
   /// \code
-  ///    true:                                  false:
-  ///    int f() {                      vs.     int f() {
-  ///      if (foo()) {                           if (foo()) {
-  ///      label1:                              label1:
-  ///        bar();                                 bar();
-  ///      }                                      }
-  ///    label2:                                label2:
-  ///      return 1;                              return 1;
-  ///    }                                      }
+  ///    GLI_Indent:                            GLI_None:
+  /// namespace NS {                  vs.     namespace NS {
+  ///   class C {                              class C {
+  ///     void foo() {                           void foo() {
+  ///       while (x) {                            while (x) {
+  ///         if (y) {                               if (y) {
+  ///         label:                               label:
----------------
varshneydevansh wrote:

looking into this

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


More information about the cfe-commits mailing list