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)
commitcdd0662b4e5a3f15e97229d43e7c3f5350315e22
treee47eac1e8ba5f05c8700cbbe317df101a04e3c0b
parenteb9af294266ee67924030f546205ea41a3eea0c2
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.

llvm-svn: 181778
clang/lib/Format/Format.cpp
clang/unittests/Format/FormatTest.cpp