llvm-project/clang/lib/Format
Manuel Klimek 4fe43002f8 Makes whitespace management more consistent.
Instead of selectively storing some changes and directly generating
replacements for others, we now notify the WhitespaceManager of the
whitespace before every token (and optionally with more changes inside
tokens).

Then, we run over all whitespace in the very end in original source
order, where we have all information available to correctly align
comments and escaped newlines.

The future direction is to pull more of the comment alignment
implementation that is now in the BreakableToken into the
WhitespaceManager.

This fixes a bug when aligning comments or escaped newlines in unwrapped
lines that are handled out of order:
  #define A \
    f({     \
      g();  \
    });
... now gets correctly layouted.

llvm-svn: 182467
2013-05-22 12:51:29 +00:00
..
BreakableToken.cpp Makes whitespace management more consistent. 2013-05-22 12:51:29 +00:00
BreakableToken.h Makes whitespace management more consistent. 2013-05-22 12:51:29 +00:00
CMakeLists.txt Unified token breaking logic for strings and block comments. 2013-04-15 14:28:00 +00:00
Format.cpp Makes whitespace management more consistent. 2013-05-22 12:51:29 +00:00
Makefile
TokenAnnotator.cpp Makes whitespace management more consistent. 2013-05-22 12:51:29 +00:00
TokenAnnotator.h Makes whitespace management more consistent. 2013-05-22 12:51:29 +00:00
UnwrappedLineParser.cpp Remove diagnostics from clang-format. 2013-05-15 08:14:19 +00:00
UnwrappedLineParser.h Remove diagnostics from clang-format. 2013-05-15 08:14:19 +00:00
WhitespaceManager.cpp Makes whitespace management more consistent. 2013-05-22 12:51:29 +00:00
WhitespaceManager.h Makes whitespace management more consistent. 2013-05-22 12:51:29 +00:00