[PATCH] D133087: [clang-format] [doc] Fix example of wrapping class definitions

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 6 03:24:48 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2adf241592b3: [clang-format] [doc] Fix example of wrapping class definitions (authored by Passw, committed by HazardyKnusperkeks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133087/new/

https://reviews.llvm.org/D133087

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/include/clang/Format/Format.h


Index: clang/include/clang/Format/Format.h
===================================================================
--- clang/include/clang/Format/Format.h
+++ clang/include/clang/Format/Format.h
@@ -1423,11 +1423,11 @@
     /// Wrap class definitions.
     /// \code
     ///   true:
-    ///   class foo {};
-    ///
-    ///   false:
     ///   class foo
     ///   {};
+    ///
+    ///   false:
+    ///   class foo {};
     /// \endcode
     bool AfterClass;
 
Index: clang/docs/ClangFormatStyleOptions.rst
===================================================================
--- clang/docs/ClangFormatStyleOptions.rst
+++ clang/docs/ClangFormatStyleOptions.rst
@@ -1439,12 +1439,12 @@
     .. code-block:: c++
 
       true:
-      class foo {};
-
-      false:
       class foo
       {};
 
+      false:
+      class foo {};
+
   * ``BraceWrappingAfterControlStatementStyle AfterControlStatement``
     Wrap control statements (``if``/``for``/``while``/``switch``/..).
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133087.458129.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220906/2e66c96b/attachment.bin>


More information about the cfe-commits mailing list