[clang] [clang-format] Add BreakAfterOpenBracket* and BreakBeforeCloseBracket* (PR #108332)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 25 02:06:27 PDT 2025


================
@@ -62,6 +62,57 @@ struct FormatStyle {
   /// \version 3.3
   int AccessModifierOffset;
 
+  /// Force break after the left bracket of a braced initializer list (when
+  /// ``Cpp11BracedListStyle`` is ``true``) when the list exceeds the column
+  /// limit.
+  /// \code
+  ///   true:                             false:
+  ///   vector<int> x {         vs.       vector<int> x {1,
+  ///      1, 2, 3}                            2, 3}
+  /// \endcode
+  /// \version 22
+  bool BreakAfterOpenBracketBracedList;
+
+  /// Force break after the left parenthesis of a function (declaration,
+  /// definition, call) when the parameters exceed the column limit.
+  /// \code
+  ///   true:                             false:
+  ///   foo (                   vs.       foo (a ||
+  ///      a || b)                             b)
----------------
HazardyKnusperkeks wrote:

I'd replace the `||` with `,` to differentiate it from `if` more.

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


More information about the cfe-commits mailing list