Skip to content

Commit 87337ba

Browse files
authored
Update ClangFormatStyleOptions.rst
1 parent 228747f commit 87337ba

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6846,42 +6846,39 @@ the configuration (without a prefix: ``Auto``).
68466846
.. _WrapNamespaceBodyWithEmptyLines:
68476847

68486848
**WrapNamespaceBodyWithEmptyLines** (``WrapNamespaceBodyWithEmptyLinesStyle``) :versionbadge:`clang-format 20` :ref:`<WrapNamespaceBodyWithEmptyLines>`
6849-
Controls number of empty lines at the begging and at the end of
6850-
namespace definition.
6849+
Wrap namespace body with empty lines.
68516850

68526851
Possible values:
68536852

68546853
* ``WNBWELS_Never`` (in configuration: ``Never``)
6855-
Removes all empty lines at the beginning and at the end of
6856-
namespace definition.
6854+
Remove all empty lines at the beginning and the end of namespace body.
68576855

68586856
.. code-block:: c++
68596857

68606858
namespace N1 {
68616859
namespace N2
6862-
function();
6860+
function();
68636861
}
68646862
}
68656863

68666864
* ``WNBWELS_Always`` (in configuration: ``Always``)
6867-
Always adds an empty line at the beginning and at the end of
6868-
namespace definition. MaxEmptyLinesToKeep is also applied, but
6869-
empty lines between consecutive namespace declarations are
6870-
always removed.
6865+
Always have at least one empty line at the beginning and the end of
6866+
namespace body except that the number of empty lines between consecutive
6867+
nested namespace definitions is not increased.
68716868

68726869
.. code-block:: c++
68736870

68746871
namespace N1 {
68756872
namespace N2 {
68766873

6877-
function();
6874+
function();
68786875

68796876
}
68806877
}
68816878

68826879
* ``WNBWELS_Leave`` (in configuration: ``Leave``)
6883-
Keeps existing newlines at the beginning and at the end of
6884-
namespace definition using MaxEmptyLinesToKeep for formatting.
6880+
Keep existing newlines at the beginning and the end of namespace body.
6881+
``MaxEmptyLinesToKeep`` still applies.
68856882

68866883

68876884

0 commit comments

Comments
 (0)