Skip to content

Commit f78aac7

Browse files
committed
dump format style
1 parent d123e08 commit f78aac7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

clang/docs/ClangFormatStyleOptions.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,6 +2182,24 @@ the configuration (without a prefix: ``Auto``).
21822182
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
21832183
}
21842184

2185+
.. _BinPackLongBracedLists:
2186+
2187+
**BinPackLongBracedLists** (``Boolean``) :versionbadge:`clang-format 20` :ref:`<BinPackLongBracedLists>`
2188+
If ``BinPackLongBracedLists`` is ``true`` it overrides
2189+
``BinPackArguments`` if there are 20 or more items in a braced
2190+
initializer list.
2191+
2192+
.. code-block:: c++
2193+
2194+
BinPackLongBracedLists: false vs. BinPackLongBracedLists: true
2195+
vector<int> x{ vector<int> x{1, 2, ...,
2196+
20, 21};
2197+
1,
2198+
2,
2199+
...,
2200+
20,
2201+
21};
2202+
21852203
.. _BinPackParameters:
21862204

21872205
**BinPackParameters** (``BinPackParametersStyle``) :versionbadge:`clang-format 3.7` :ref:`<BinPackParameters>`
@@ -3775,6 +3793,9 @@ the configuration (without a prefix: ``Auto``).
37753793
the parentheses of a function call with that name. If there is no name,
37763794
a zero-length name is assumed.
37773795

3796+
``BinPackArguments`` may be forced to true for initializer lists with
3797+
more than 20 items if ``BinPackLongBracedLists`` is true.
3798+
37783799
.. code-block:: c++
37793800

37803801
true: false:

0 commit comments

Comments
 (0)