From 3fd4a968ad80d603ea4dbd616c00824cf165e384 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 5 Mar 2019 01:45:31 +0000 Subject: [PATCH] [clang-format][docs][NFC] Fix example for Allman brace breaking style I assume the example is wrong as it's clearly missing line-breaks before braces. I just ran the example through clang-format with .clang-format like this: BreakBeforeBraces: Allman Differential Revision: https://reviews.llvm.org/D58941 llvm-svn: 355365 --- clang/docs/ClangFormatStyleOptions.rst | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst index ce821ba9c10f2..582b9d938cc19 100644 --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -925,19 +925,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