#
5c24cca0 |
| 23-May-2013 |
Manuel Klimek <klimek@google.com> |
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
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.
llvm-svn: 182572
show more ...
|
Revision tags: llvmorg-3.3.0-rc2 |
|
#
05c6789b |
| 22-May-2013 |
Manuel Klimek <klimek@google.com> |
Fix uninitialized access error found by valgrind.
llvm-svn: 182476
|
#
4fe43002 |
| 22-May-2013 |
Manuel Klimek <klimek@google.com> |
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
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
show more ...
|
#
c1d83f47 |
| 13-May-2013 |
Manuel Klimek <klimek@google.com> |
Fix style according to post-commit review comments.
llvm-svn: 181701
|
#
b9eae4c1 |
| 13-May-2013 |
Manuel Klimek <klimek@google.com> |
Implements UseTab for clang-format.
This is required for kernel linux kernel style formatting.
llvm-svn: 181693
|
Revision tags: llvmorg-3.3.0-rc1 |
|
#
6fe2f009 |
| 25-Apr-2013 |
Daniel Jasper <djasper@google.com> |
Add option to align escaped newlines left.
This enables formattings like:
#define A \ int aaaa; \ int b; \ int ccc; \ int dddddddddd;
Enabling this for Google/Chromium styl
Add option to align escaped newlines left.
This enables formattings like:
#define A \ int aaaa; \ int b; \ int ccc; \ int dddddddddd;
Enabling this for Google/Chromium styles only as I don't know whether it is desired for Clang/LLVM.
llvm-svn: 180253
show more ...
|
#
9e90b62e |
| 17-Apr-2013 |
Alexander Kornienko <alexfh@google.com> |
Unified token breaking logic: support for line comments.
Summary: Added BreakableLineComment, moved common code from BreakableBlockComment to newly added BreakableComment. As a side-effect of the re
Unified token breaking logic: support for line comments.
Summary: Added BreakableLineComment, moved common code from BreakableBlockComment to newly added BreakableComment. As a side-effect of the rewrite, found another problem with escaped newlines and had to change code which removes trailing whitespace from line comments not to break after this patch.
Reviewers: klimek, djasper
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D682
llvm-svn: 179693
show more ...
|
#
cb45bc18 |
| 15-Apr-2013 |
Alexander Kornienko <alexfh@google.com> |
Unified token breaking logic for strings and block comments.
Summary: Both strings and block comments are broken into lines in breakProtrudingToken. Logic specific for strings or block comments is a
Unified token breaking logic for strings and block comments.
Summary: Both strings and block comments are broken into lines in breakProtrudingToken. Logic specific for strings or block comments is abstracted in implementations of the BreakToken interface. Among other goodness, this change fixes placement of backslashes after a block comment inside a preprocessor directive (see removed FIXMEs in unit tests).
The code is far from being polished, and some parts of it will be changed for line comments support.
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D665
llvm-svn: 179526
show more ...
|