[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
This commit is contained in:
Jan Korous 2019-03-05 01:45:31 +00:00
parent 814ad73452
commit 3fd4a968ad
1 changed files with 15 additions and 6 deletions

View File

@ -925,19 +925,28 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++ .. code-block:: c++
try { try
{
foo(); foo();
} }
catch () { catch ()
{
} }
void foo() { bar(); } 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``) * ``BS_GNU`` (in configuration: ``GNU``)
Always break before braces and add an extra level of indentation to Always break before braces and add an extra level of indentation to