[clang] [clang-format] Add AfterComma option for BreakConstructorInitializers (PR #180541)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 11:25:50 PST 2026


================
@@ -2477,7 +2477,13 @@ struct FormatStyle {
     ///        initializer1(),
     ///        initializer2()
     /// \endcode
-    BCIS_AfterColon
+    BCIS_AfterColon,
+    /// Break constructor initializers only after the commas.
+    /// \code
+    ///    Constructor() : initializer1(),
+    ///                    initializer2()
+    /// \endcode
+    BCIS_AfterComma
----------------
HazardyKnusperkeks wrote:

We have the options sorted, but the enumerators within the enums are not sorted. (And I actually wouldn't to that in all cases.)

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


More information about the cfe-commits mailing list