]> granicus.if.org Git - clang/commit
Correctly determine ranges for clang-format.
authorDaniel Jasper <djasper@google.com>
Tue, 14 May 2013 10:31:09 +0000 (10:31 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 14 May 2013 10:31:09 +0000 (10:31 +0000)
commit84f5ddfacc59c5d4878cd47b7794e53dc8e2e9f9
treec8fb7b989f6eb632dd3b37893a6a28000c84c941
parent1fb8d8814ae28a4ebe94652faafad8545a115bfe
Correctly determine ranges for clang-format.

We have been assuming that CharSourceRange::getTokenRange() by itself
expands a range until the end of a token, but in fact it only sets
IsTokenRange to true. Thus, we have so far only considered the first
character of the last token to belong to an unwrapped line. This
did not really manifest in symptoms as all edit integrations
expand ranges to fully lines.

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