]> granicus.if.org Git - clang/commit
Major refactoring of BreakableToken.
authorManuel Klimek <klimek@google.com>
Mon, 27 May 2013 15:23:34 +0000 (15:23 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 27 May 2013 15:23:34 +0000 (15:23 +0000)
commitde008c0f3bf66103185fc9f7f49995fa431451a6
tree14f67b12393194e02efbb38e4f9280663ea660c8
parentbdf2bba1cb8c6347f43a3caa36e801b1d86450d0
Major refactoring of BreakableToken.

Unify handling of whitespace when breaking protruding tokens with other
whitespace replacements.

As a side effect, the BreakableToken structure changed significantly:
- have a common base class for single-line breakable tokens, as they are
  much more similar
- revamp handling of multi-line comments; we now calculate the
  information about lines in multi-line comments similar to normal
  tokens, and always issue replacements

As a result, we were able to get rid of special casing of trailing
whitespace deletion for comments in the whitespace manager and the
BreakableToken and fixed bugs related to tab handling and escaped
newlines.

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