[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


================
@@ -76,26 +127,16 @@ struct FormatStyle {
     ///       argument2);
     /// \endcode
     BAS_DontAlign,
-    /// Always break after an open bracket, if the parameters don't fit
-    /// on a single line, e.g.:
-    /// \code
-    ///   someLongFunction(
-    ///       argument1, argument2);
-    /// \endcode
+    /// This is **deprecated**. See ``BreakAfterOpenBracketBracedList``,
+    /// ``BreakAfterOpenBracketFunction``, ``BreakAfterOpenBracketIf``,
+    /// ``BreakAfterOpenBracketLoop``, ``BreakAfterOpenBracketSwitch``.
     BAS_AlwaysBreak,
----------------
HazardyKnusperkeks wrote:

It's kind of bad, that this is still available, even though it is deprecated. Users of libFormat may just set it and wonder why the behavior changed (i.e it's ignored).
Normally we break the build with deprecations and the users are forced to take action, but they notice.

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


More information about the cfe-commits mailing list