[clang] [clang-format] Add KwBreakBeforeCaseLabel (PR #227668)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 3 05:39:14 PDT 2026


================
@@ -2838,6 +2838,21 @@ struct FormatStyle {
   /// \version 19
   BreakTemplateDeclarationsStyle BreakTemplateDeclarations;
 
+  /// Keep the break keyword and the following case label on the same line.
+  ///
+  /// \code
+  ///    false:                         true:
+  ///    switch (n) {                 switch (n) {
----------------
HazardyKnusperkeks wrote:

```suggestion
  ///    false:                       true:
  ///    switch (n) {      vs.        switch (n) {
```

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


More information about the cfe-commits mailing list