[llvm-bugs] [Bug 31951] New: clang-format incorrectly removes space between macro and ::-qualified return type

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 13 13:48:12 PST 2017


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

            Bug ID: 31951
           Summary: clang-format incorrectly removes space between macro
                    and ::-qualified return type
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dcheng at google.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

$ cat test.cc
#define MY_MACRO

MY_MACRO ::std::string GetString() {
  return "abc";
}
$ clang-format -i --style=Chromium test.cc
$ cat test.cc
#define MY_MACRO

MY_MACRO::std::string GetString() {
  return "abc";
}

This is a bit tricky since IIRC, clang-format doesn't know anything about
macros... and without that knowledge, this could read ambiguously.

-- 
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/20170213/e6de6b6b/attachment.html>


More information about the llvm-bugs mailing list