[clang] [clang-format] add BinPackLongBracedLists style option (PR #112482)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 7 18:59:42 PST 2025
================
@@ -1212,6 +1212,22 @@ struct FormatStyle {
/// \version 3.7
bool BinPackArguments;
+ /// If ``BinPackLongBracedLists`` is ``true`` it overrides
+ /// ``BinPackArguments`` if there are 20 or more items in a braced
+ /// initializer list.
+ /// \code
+ /// BinPackLongBracedLists: false vs. BinPackLongBracedLists: true
+ /// vector<int> x{ vector<int> x{1, 2, ...,
+ /// 20, 21};
+ /// 1,
+ /// 2,
+ /// ...,
+ /// 20,
+ /// 21};
+ /// \endcode
+ /// \version 21
+ bool BinPackLongBracedLists;
----------------
owenca wrote:
```suggestion
bool BinPackLongBracedList;
```
https://github.com/llvm/llvm-project/pull/112482
More information about the cfe-commits
mailing list