[clang] [clang-format] add BinPackLongBracedLists style option (PR #112482)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 7 12:24:50 PST 2024


================
@@ -3398,6 +3401,21 @@ struct FormatStyle {
   /// \version 3.7
   unsigned MaxEmptyLinesToKeep;
 
+  /// If ``BinPackArguments`` is ``false`` this option can override it if
+  /// ``true`` when 20 or more items are 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 20
+  bool BinPackLongBracedLists;
----------------
HazardyKnusperkeks wrote:

Please resort.

https://github.com/llvm/llvm-project/pull/112482


More information about the cfe-commits mailing list