[PATCH] clang-format: fix for \r\r\n produced in multiline block comments

Christopher Olsen chrisaolsen at gmail.com
Tue Oct 29 16:55:21 PDT 2013

In multiline block comments \r\n line endings are replaced with
\r\r\n.  BreakableToken does not consider \r a "blank" character.  So,
internally it breaks lines on \n, leaving a dangling \r, then replaces
the \n with \r\n resulting in \r\r\n.

Attached is a fix which simply adds \r to the list of blank characters
in BreakableToken and includes a test case in SupportsCRLF.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-format_block_comments.patch
Type: application/octet-stream
Size: 1349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131029/c09c4db4/attachment.obj>

More information about the cfe-commits mailing list