]> granicus.if.org Git - clang/commit
Don't break line comments with escaped newlines.
authorAlexander Kornienko <alexfh@google.com>
Tue, 16 Jul 2013 21:06:13 +0000 (21:06 +0000)
committerAlexander Kornienko <alexfh@google.com>
Tue, 16 Jul 2013 21:06:13 +0000 (21:06 +0000)
commit10c26b2e974f97c75fc3aaa302ca750f422cbce1
tree841e43e58bd1f676575aae898f0caf37fed737d6
parent561211d35b5a2825fba6d0c017044f6896b204fd
Don't break line comments with escaped newlines.

Summary:
These can appear when comments contain command lines with quoted line
breaks. As the text (including escaped newlines and '//' from consecutive lines)
is a single line comment, we used to break it even when it didn't exceed column
limit. This is a temporary solution, in the future we may want to support this
case completely - at least adjust leading whitespace when changing indentation
of the first line.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1146

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186456 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp