| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to format initializers like this (with a sort of hacky implementation):
Constructor()
: Val1(A),
Val2(B) {
and now format like this (with a somewhat better solution):
Constructor()
: Val1(A), Val2(B) {
assuming this would not fit on a single line. Also added tests.
As a side effect we now first analyze whether an UnwrappedLine needs to be
split at all. If not, not splitting it is the best solution by definition. As
this should be a very common case in normal code, not exploring the entire
solution space can provide significant speedup.
llvm-svn: 170457
|
| |
|
|
|
|
|
|
|
|
|
|
| |
avoided.
This required a minor modification of the memoization as now the
"CurrentPenalty" depends on whether or not we break before the current
token. Therefore, the CurrentPenalty should not be memoized but added
after retrieving a value from memory. This should not affect the runtime
behavior.
llvm-svn: 170337
|
| |
|
|
|
|
|
|
|
| |
More specifically:
- Improve formatting of static initializers.
- Fix formatting of lines comments in enums.
- Fix formmating of trailing line comments.
llvm-svn: 170316
|
| |
|
|
|
|
| |
Fix spacing before ",".
llvm-svn: 169746
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D198
llvm-svn: 169738
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed.
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D186
llvm-svn: 169605
|
| |
|
|
|
|
|
| |
Now not joining keywords with '::' and not putting a space between
a pointer pointer.
llvm-svn: 169594
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: + tests arranged in groups, as their number is already quite large.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D185
llvm-svn: 169520
|
| |
|
|
| |
llvm-svn: 169500
|
| |
|
|
|
|
|
| |
Also, small fix for handling the first token correctly.
Review: http://llvm-reviews.chandlerc.com/D177
llvm-svn: 169488
|
| |
|
|
| |
llvm-svn: 169390
|
| |
|
|
|
|
|
|
|
|
| |
- Fix behavior of memoization together with optimization
- Correctly attribute the PenaltyIndentLevel (breaking directly after "(" did
not count towards the inner level)
- Recognize more tokens as assignments
Review: http://llvm-reviews.chandlerc.com/D172
llvm-svn: 169384
|
| |
|
|
|
|
| |
http://llvm-reviews.chandlerc.com/D164#comment-4 : comments and a method rename
llvm-svn: 169382
|
| |
|
|
|
|
|
| |
Recognize '!=' as a binary operator and assume that there are no
type definitions on the RHS of an assignment.
llvm-svn: 169363
|
| |
|
|
| |
llvm-svn: 169303
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Adds recovery for structural errors in clang-format.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D164
llvm-svn: 169286
|
| |
|
|
|
| |
Review: http://llvm-reviews.chandlerc.com/D162
llvm-svn: 169274
|
| |
|
|
|
|
| |
directives.
llvm-svn: 169261
|
| |
|
|
|
|
|
|
| |
Also fix header guard.
http://llvm-reviews.chandlerc.com/D159
llvm-svn: 169254
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
| |
|
|
|
|
|
|
| |
The necessity of this fix points to a problem with the design
of the addToken during the optimiation phase, which we need to address
in a much more principled way.
llvm-svn: 169151
|
|
|
This formatting library will be used by a stand-alone clang-format tool
and can also be used when writing other refactorings.
Manuel's original design document:
https://docs.google.com/a/google.com/document/d/1gpckL2U_6QuU9YW2L1ABsc4Fcogn5UngKk7fE5dDOoA/edit
The library can already successfully format itself.
Review: http://llvm-reviews.chandlerc.com/D80
llvm-svn: 169137
|