[PATCH] Do not escape a newline after ??/ unless trigraphs are enabled

Rui Ueyama ruiu at google.com
Mon Apr 8 22:28:33 PDT 2013


Hi,

I found that Clang always treats character sequence "??/" at the end of a
line comment as a trigraph, even if trigraphs are disabled. As a result, if
??/ is at the end of a line comment, the subsequent newline is escaped, and
the next line become a continuation of the line comment.

Patch attached. Now it warns about a trigraph and does not treat it as a
backslash unless trigraphs are enabled.

Rui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130408/802458c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: line-comment.patch
Type: application/octet-stream
Size: 3032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130408/802458c7/attachment.obj>


More information about the cfe-commits mailing list