[PATCH] D58941: [clang-format][docs][NFC] Fix example for Allman brace breaking style

Jan Korous via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 17:44:39 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL355365: [clang-format][docs][NFC] Fix example for Allman brace breaking style (authored by jkorous, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D58941?vs=189242&id=189250#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D58941

Files:
  cfe/trunk/docs/ClangFormatStyleOptions.rst


Index: cfe/trunk/docs/ClangFormatStyleOptions.rst
===================================================================
--- cfe/trunk/docs/ClangFormatStyleOptions.rst
+++ cfe/trunk/docs/ClangFormatStyleOptions.rst
@@ -925,19 +925,28 @@
 
     .. 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58941.189250.patch
Type: text/x-patch
Size: 768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190305/2020541e/attachment.bin>


More information about the llvm-commits mailing list