[llvm-bugs] [Bug 46254] New: [clang-format] BreakBeforeBraces: Whitesmiths ; In a ‘switch’ block, the ‘default’ case is always missing and indentation level.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 9 09:21:45 PDT 2020


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

            Bug ID: 46254
           Summary: [clang-format] BreakBeforeBraces: Whitesmiths ; In a
                    ‘switch’ block, the ‘default’ case is always missing
                    and indentation level.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: smassico at matrox.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Bug found in upcoming llvm 11.0.
https://prereleases.llvm.org/win-snapshots/ClangFormat-2663a25f.vsix

In ‘clang-format’, when using "BreakBeforeBraces: Whitesmiths".
In a ‘switch’ block, the ‘default’ case is always missing and indentation
level. See below.
(It seems related to: https://reviews.llvm.org/D67627)

   switch(x)
      {
      case 0:
         {
         foo(x + 1);
         }
      break;

      case 1:
         {
         goo(x % 42);
         }
      break;

   default:
         {
         printf("the default case");
         }
      break;
      }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200609/e7ff21d3/attachment.html>


More information about the llvm-bugs mailing list