Skip to content

Commit d25eb46

Browse files
committed
dump format style
1 parent 5f868e9 commit d25eb46

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
@@ -2177,6 +2177,23 @@ the configuration (without a prefix: ``Auto``).
21772177
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
21782178
}
21792179

2180+
.. _BinPackLongBracedLists:
2181+
2182+
**BinPackLongBracedLists** (``Boolean``) :versionbadge:`clang-format 20` :ref:`<BinPackLongBracedLists>`
2183+
If ``BinPackArguments`` is ``false`` this option can override it if
2184+
``true`` when 20 or more items are in a braced initializer list.
2185+
2186+
.. code-block:: c++
2187+
2188+
BinPackLongBracedLists: false vs. BinPackLongBracedLists: true
2189+
vector<int> x{ vector<int> x{1, 2, ...,
2190+
20, 21};
2191+
1,
2192+
2,
2193+
...,
2194+
20,
2195+
21};
2196+
21802197
.. _BinPackParameters:
21812198

21822199
**BinPackParameters** (``BinPackParametersStyle``) :versionbadge:`clang-format 3.7` :ref:`<BinPackParameters>`
@@ -3769,6 +3786,9 @@ the configuration (without a prefix: ``Auto``).
37693786
the parentheses of a function call with that name. If there is no name,
37703787
a zero-length name is assumed.
37713788

3789+
``BinPackArguments`` may be forced to true for initializer lists with
3790+
more than 20 items if ``BinPackLongBracedLists`` is true.
3791+
37723792
.. code-block:: c++
37733793

37743794
true: false:

0 commit comments

Comments
 (0)