[LLVMbugs] [Bug 17122] New: clang-format breaks code by splitting a string in a macro call.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 6 08:55:42 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17122

            Bug ID: 17122
           Summary: clang-format breaks code by splitting a string in a
                    macro call.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: scott.determan at yahoo.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Assume you have a macro defined as follows:
_T(x) L ## x

Where L"A string" makes wchar_t literal

Now when you have code like this:
_T("Some really long string that needs to be split into multiple lines")

clang-format will output:

_T("Some really long string that needs"
   " to be split into multiple lines")

On visual studio 2010, this appears to be expanded as:
L"Some really long string that needs" " to be split into multiple lines"

and I get an error:
error C2308: concatenating mismatched strings

-- 
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/20130906/a7f8236b/attachment.html>


More information about the llvm-bugs mailing list