]> granicus.if.org Git - clang/commit
Use a SourceRange for the whitespace location in FormatToken.
authorManuel Klimek <klimek@google.com>
Thu, 23 May 2013 10:56:37 +0000 (10:56 +0000)
committerManuel Klimek <klimek@google.com>
Thu, 23 May 2013 10:56:37 +0000 (10:56 +0000)
commitad3094b7d85a4f8eeaf3f60364d5e8796537f061
tree75c1cb5501de785157b2212328229eb92f38b06d
parent2424eefa6936ec2dc35188e19c99e2f85428b52e
Use a SourceRange for the whitespace location in FormatToken.

Replaces the use of WhitespaceStart + WhitspaceLength.
This made a bug in the formatter obvous where we would incorrectly
calculate the next column.

FIXME: There's a similar bug left regarding TokenLength. We should
probably also move to have a TokenRange instead.

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