https://bugs.llvm.org/show_bug.cgi?id=38854

            Bug ID: 38854
           Summary: Wrapped block after case label should not be merged
                    into a single line
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: owenpi...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

With configuration file:

BasedOnStyle: LLVM
IndentCaseLabels: true
AllowShortBlocksOnASingleLine: false
BreakBeforeBraces: Custom
BraceWrapping:
  AfterControlStatement: true

The following code:

switch (n) {
  case 0: {
    return false;
  }
  default: {
    return true;
  }
}

is incorrectly formatted to:

switch (n)
{
  case 0:
  { return false; }
  default:
  { return true; }
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to