Skip to content

Commit 7348776

Browse files
committed
dump format style
1 parent 49fb737 commit 7348776

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3769,6 +3769,9 @@ the configuration (without a prefix: ``Auto``).
37693769
the parentheses of a function call with that name. If there is no name,
37703770
a zero-length name is assumed.
37713771

3772+
``BinPackArguments`` may be ignored for initializer lists with more than
3773+
``MaxSingleLinesInBracedList`` items.
3774+
37723775
.. code-block:: c++
37733776

37743777
true: false:
@@ -4883,6 +4886,23 @@ the configuration (without a prefix: ``Auto``).
48834886
return i;
48844887
}
48854888

4889+
.. _MaxSingleLinesInBracedList:
4890+
4891+
**MaxSingleLinesInBracedList** (``Unsigned``) :versionbadge:`clang-format 20` :ref:`<MaxSingleLinesInBracedList>`
4892+
The maximum number of single item lines to keep in a braced list when
4893+
``BinPackArguments`` is ``false`` before formatting items in columns.
4894+
Defaults to 20.
4895+
4896+
.. code-block:: c++
4897+
4898+
MaxSingleLinesInBracedList: 5 vs. MaxSingleLinesInBracedList: 4
4899+
vector<int> x{ vector<int> x{1, 2, 3, 4, 5};
4900+
1,
4901+
2,
4902+
3,
4903+
4,
4904+
5};
4905+
48864906
.. _NamespaceIndentation:
48874907

48884908
**NamespaceIndentation** (``NamespaceIndentationKind``) :versionbadge:`clang-format 3.7` :ref:`<NamespaceIndentation>`

0 commit comments

Comments
 (0)