[llvm-bugs] [Bug 38713] New: Mishandles a short block after "default:" in a switch statement

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 27 02:20:01 PDT 2018


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

            Bug ID: 38713
           Summary: Mishandles a short block after "default:" in a switch
                    statement
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: owenpiano at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

With BasedOnStyle set to LLVM, the following code

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

is formatted into:

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

-- 
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/20180827/f273a556/attachment.html>


More information about the llvm-bugs mailing list