patch to preserve carriage returns when using clang-format VS plugin

jpark37 . jpark37 at gmail.com
Wed Nov 27 15:42:43 PST 2013


Oops, sorry; the attached patch is updated and retested. I ran
clang-format, and it created more diffs than just my changes; those have
been undone to keep the patch focused. I've also switched the cascading if
to a switch statement.

- James


On Wed, Nov 27, 2013 at 5:24 PM, Daniel Jasper <djasper at google.com> wrote:

> I'd like Manuel to take a look, but in general, please format Clang/LLVM
> files with the correct style (i.e. "clang-format -style LLVM") :-).
>
>
> On Wed, Nov 27, 2013 at 11:28 AM, jpark37 . <jpark37 at gmail.com> wrote:
>
>> Hello there,
>>
>> I'm seeing newlines without carriage returns when using the clang-format
>> plugin for Visual Studio. The issue seems to be that clang-format is not
>> escaping newline characters when run with -output-replacements-xml, so the
>> .NET XML stuff ends up collapsing \r\n down to \n. I've attached a patch
>> that I've tested and appears to address the problem.
>>
>> - James
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131127/49e2a348/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ClangFormat.zip
Type: application/zip
Size: 735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131127/49e2a348/attachment.zip>


More information about the cfe-commits mailing list