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

            Bug ID: 38557
           Summary: comments between "default" and ':' causes the case
                    label to be treated as an identifier
           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

Created attachment 20707
  --> https://bugs.llvm.org/attachment.cgi?id=20707&action=edit
test case

Command line:
clang-format -style="{IndentCaseLabels: true}" foo.cpp

Output with an incorrect indentation for the default case label:
bool foo(int n) {
  switch (n) {
  default /*comments*/:
      return true;
    case 0:
      return false;
  }
}

Expected output:
bool foo(int n) {
  switch (n) {
    default /*comments*/:
      return true;
    case 0:
      return false;
  }
}

-- 
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