[PATCH] D58941: [clang-format][docs][NFC] Fix example for Allman brace breaking style
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=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 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 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D58941: [clang-format][docs][NFC] Fix example for Allman brace breaking style
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM. Good catch, left looks like K or something. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58941/new/ https://reviews.llvm.org/D58941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D58941: [clang-format][docs][NFC] Fix example for Allman brace breaking style
jkorous created this revision. jkorous added reviewers: JDevlieghere, krasimir, benhamilton. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. I assume the example is wrong as it's clearly missing line-breaks before braces. That's about my level of understanding and I am totally oblivious to any finer details. I just ran the example through clang-format with .clang-format like this: BreakBeforeBraces: Allman Repository: rC Clang https://reviews.llvm.org/D58941 Files: clang/docs/ClangFormatStyleOptions.rst Index: clang/docs/ClangFormatStyleOptions.rst === --- clang/docs/ClangFormatStyleOptions.rst +++ clang/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 Index: clang/docs/ClangFormatStyleOptions.rst === --- clang/docs/ClangFormatStyleOptions.rst +++ clang/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 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits