Daniel Jasper
aa1c920db8
Indentation fixes for clang-format.
...
- 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
2012-12-05 14:57:28 +00:00
Daniel Jasper
426702dcd0
Small tweaks to automatic formatting.
...
Recognize '!=' as a binary operator and assume that there are no
type definitions on the RHS of an assignment.
llvm-svn: 169363
2012-12-05 07:51:39 +00:00
Alexander Kornienko
870f9eb9cc
Error recovery part 2
...
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
2012-12-04 17:27:50 +00:00
Alexander Kornienko
0ea8e107fc
Clang-format error recovery part 1
...
Reviewers: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D163
llvm-svn: 169278
2012-12-04 15:40:36 +00:00
Alexander Kornienko
b7076a2308
Enum formatting implementation
...
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D161
llvm-svn: 169272
2012-12-04 14:46:19 +00:00
Daniel Jasper
8b5297117b
Small fixes to unary operator recognition and handling of include
...
directives.
llvm-svn: 169261
2012-12-04 13:02:32 +00:00
Daniel Jasper
9b155475a8
Replace workarounds with correct fixes.
...
Also fix header guard.
http://llvm-reviews.chandlerc.com/D159
llvm-svn: 169254
2012-12-04 10:50:12 +00:00
Chandler Carruth
320d9666ee
Sort the #include lines for unittests/...
...
I've tried to place sensible headers at the top as main-module headers.
llvm-svn: 169243
2012-12-04 09:45:34 +00:00
Daniel Jasper
f793511579
Initial version of formatting library.
...
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
2012-12-03 18:12:45 +00:00