Author: jkorous Date: Mon Mar 4 17:45:31 2019 New Revision: 355365 URL: http://llvm.org/viewvc/llvm-project?rev=355365&view=rev Log: [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 Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ClangFormatStyleOptions.rst?rev=355365&r1=355364&r2=355365&view=diff ============================================================================== --- cfe/trunk/docs/ClangFormatStyleOptions.rst (original) +++ cfe/trunk/docs/ClangFormatStyleOptions.rst Mon Mar 4 17:45:31 2019 @@ -925,19 +925,28 @@ the configuration (without a prefix: ``A .. 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits