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
Showing
- lib/Format/Format.cpp 35 additions, 18 deletionslib/Format/Format.cpp
- lib/Format/UnwrappedLineParser.cpp 2 additions, 1 deletionlib/Format/UnwrappedLineParser.cpp
- lib/Format/UnwrappedLineParser.h 4 additions, 11 deletionslib/Format/UnwrappedLineParser.h
- lib/Format/WhitespaceManager.cpp 6 additions, 11 deletionslib/Format/WhitespaceManager.cpp
- unittests/Format/FormatTest.cpp 6 additions, 0 deletionsunittests/Format/FormatTest.cpp
Loading
Please register or sign in to comment