[clang-format][NFC] Fix BS_Allman style example in the header docs are generated...
authorJan Korous <jkorous@apple.com>
Wed, 5 Jun 2019 20:59:48 +0000 (20:59 +0000)
committerJan Korous <jkorous@apple.com>
Wed, 5 Jun 2019 20:59:48 +0000 (20:59 +0000)
Differential Revision: https://reviews.llvm.org/D61729

llvm-svn: 362646

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

index 342ecc7..8bd0e9c 100644 (file)
@@ -1059,19 +1059,28 @@ the configuration (without a prefix: ``Auto``).
 
     .. code-block:: c++
 
-      try {
+      try
+      {
         foo();
       }
-      catch () {
+      catch ()
+      {
       }
       void foo() { bar(); }
-      class foo {
+      class foo
+      {
       };
-      if (foo()) {
+      if (foo())
+      {
       }
-      else {
+      else
+      {
       }
-      enum X : int { A, B };
+      enum X : int
+      {
+        A,
+        B
+      };
 
   * ``BS_GNU`` (in configuration: ``GNU``)
     Always break before braces and add an extra level of indentation to
index af7c351..0aae752 100644 (file)
@@ -642,19 +642,28 @@ struct FormatStyle {
     BS_Stroustrup,
     /// Always break before braces.
     /// \code
-    ///   try {
+    ///   try
+    ///   {
     ///     foo();
     ///   }
-    ///   catch () {
+    ///   catch ()
+    ///   {
     ///   }
     ///   void foo() { bar(); }
-    ///   class foo {
+    ///   class foo
+    ///   {
     ///   };
-    ///   if (foo()) {
+    ///   if (foo())
+    ///   {
     ///   }
-    ///   else {
+    ///   else
+    ///   {
     ///   }
-    ///   enum X : int { A, B };
+    ///   enum X : int
+    ///   {
+    ///     A,
+    ///     B
+    ///   };
     /// \endcode
     BS_Allman,
     /// Always break before braces and add an extra level of indentation to