[llvm-bugs] [Bug 36949] New: [Regression] clang-format 6.0 misindents #defines

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 29 05:44:53 PDT 2018


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

            Bug ID: 36949
           Summary: [Regression] clang-format 6.0 misindents #defines
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bugs at 0x83.eu
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Created attachment 20142
  --> https://bugs.llvm.org/attachment.cgi?id=20142&action=edit
format description

With clang-format 5.0.1, this code

#define TOOL_LUT_ITEM(x) { #x, ToolID::x }

gets formatted as (omiting the backslashes at the end of the line)

#define TOOL_LUT_ITEM(x)
    {                   
        #x, ToolID::x   
    }

with 6.0 it looks like this:

#define TOOL_LUT_ITEM(x)
    {                   
#x, ToolID::x           
    }

The trailing backslash is misplaced as well.

-- 
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/20180329/a2f66a54/attachment.html>


More information about the llvm-bugs mailing list