================
@@ -2609,6 +2609,35 @@ struct FormatStyle {
   /// \version 7
   BreakInheritanceListStyle BreakInheritanceList;
 
+  /// If set to a value greater than 0, any parenthesized parameter or argument
+  /// list with more parameters than the specified number will be formatted 
with
+  /// one parameter per line. This applies to all parameter-like lists enclosed
+  /// in parentheses, including function declarations, function definitions,
+  /// function calls, and comma expressions.
+  /// \code
+  ///    BreakParametersAfter: 3
+  ///
+  ///    void foo(int a);
+  ///
+  ///    void bar(int a, int b, int c);
+  ///
+  ///    void baz(int a,
+  ///             int b,
+  ///             int c,
+  ///             int d);
+  ///
+  ///    foo(1);
+  ///
+  ///    bar(1, 2, 3);
+  ///
+  ///    baz(1,
+  ///        2,
+  ///        3,
+  ///        4);
+  /// \endcode
+  /// \version 23
+  unsigned BreakParametersAfter;
----------------
EtienneBasilik wrote:

I think BreakAfter is contradictory with the current options (BinPack, 
OnePerLine, AlwaysOnePerLine) and hence needs a fourth option which will be the 
only one using BreakAfter. Indeed:

- BinPack allows multiple lines each with >1 arguments. BreakAfter doesn't.
- OnePerLine allows more than BreakAfter arguments on the same line.
- AlwaysOnePerLine doesn't allow <=BreakAfter arguments to be on a single line.

https://github.com/llvm/llvm-project/pull/181281
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to