[llvm-bugs] [Bug 26097] New: clang-format indents case: too much if it is in a macro

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jan 9 10:26:26 PST 2016


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

            Bug ID: 26097
           Summary: clang-format indents case: too much if it is in a
                    macro
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: yaron.keren at gmail.com
                CC: djasper at google.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

void foo() {
#define CASE(X)                                                              \
  case X:                                                                    \
    break;

  int i;
  switch (i) {
  case 0:
    break;
    CASE(1)
    CASE(2)
  case 3:
    break;
  }
}

In this simplified example, CASE is indented two spaces too many: after the
break the indention should go back two spaces to the "case" indention.

clang-format is ClangFormat-r255486.vsix.

-- 
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/20160109/7ea7ed63/attachment.html>


More information about the llvm-bugs mailing list