]> granicus.if.org Git - clang/commit
Fixes incorrect indentation of line comments after break and re-alignment.
authorAlexander Kornienko <alexfh@google.com>
Mon, 17 Jun 2013 12:59:44 +0000 (12:59 +0000)
committerAlexander Kornienko <alexfh@google.com>
Mon, 17 Jun 2013 12:59:44 +0000 (12:59 +0000)
commit22d0e2985d00010ed1d56168985ca34adc75b80a
tree7c10891de234e509b9de7567ce17eb0240e9e731
parentcff15128c6c089bd6fae841b80680e6f5afbf0bf
Fixes incorrect indentation of line comments after break and re-alignment.

Summary:
Selectively propagate the information about token kind in
WhitespaceManager::replaceWhitespaceInToken.For correct alignment of new
segments of line comments in order to align them correctly. Don't set
BreakBeforeParameter in breakProtrudingToken for line comments, as it introduces
a break after the _next_ parameter. Added tests for related functions.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D980

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