Skip to content

Commit 72e7207

Browse files
committed
dump format style
1 parent d625f81 commit 72e7207

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

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

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

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

37743795
true: false:

0 commit comments

Comments
 (0)