djasper closed this revision.
djasper added a comment.
Submitted as r248999. Thank you!
http://reviews.llvm.org/D12362
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
berenm added a comment.
Thanks, I don't have commit access.
http://reviews.llvm.org/D12362
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
This looks awesome. Do you have commit access?
Comment at: unittests/Format/FormatTest.cpp:8699
@@ +8698,3 @@
+ "int one = 1;\n"
+ "
berenm marked 2 inline comments as done.
berenm added a comment.
http://reviews.llvm.org/D12362
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
berenm marked 7 inline comments as done.
Comment at: unittests/Format/FormatTest.cpp:8699
@@ +8698,3 @@
+ "int one = 1;\n"
+ "\n"
+ "unsigned oneTwoThree = 123;",
I think I actually managed to do something
berenm updated this revision to Diff 36207.
berenm added a comment.
Fix arcanist insisting on creating the diff against old revision...
http://reviews.llvm.org/D12362
Files:
include/clang/Format/Format.h
lib/Format/Format.cpp
lib/Format/WhitespaceManager.cpp
lib/Format/WhitespaceManager
djasper added inline comments.
Comment at: unittests/Format/FormatTest.cpp:8699
@@ +8698,3 @@
+ Alignment));
+ Alignment.AlignConsecutiveAssignments = true;
+ verifyFormat("float something = 2000;\n"
berenm wrote:
> djasper wrote:
> > Can
berenm added inline comments.
Comment at: unittests/Format/FormatTest.cpp:8699
@@ +8698,3 @@
+ Alignment));
+ Alignment.AlignConsecutiveAssignments = true;
+ verifyFormat("float something = 2000;\n"
djasper wrote:
> Can you add a case (unl
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:270
@@ +269,3 @@
+ if (Changes[i].NewlinesBefore > 1 || !FoundDeclarationOnLine ||
+ FoundLeftBraceOnLine || FoundLeftParenOnLine) {
+AlignSequence();
Generally, we d
berenm added a comment.
Ping?
The unit tests should work fine, now that http://reviews.llvm.org/D12369 has
been merged.
http://reviews.llvm.org/D12362
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/li
berenm updated this revision to Diff 33212.
berenm added a comment.
Added some test cases in combined usage with AlignConsecutiveAssignments.
The tests should pass with http://reviews.llvm.org/D12369 applied.
http://reviews.llvm.org/D12362
Files:
include/clang/Format/Format.h
lib/Format/Fo
berenm added a comment.
Actually, I think there is a bug in the assignment alignment code. Even without
this patch, this code doesn't align properly:
int oneTwoThree = 123;
int oneTwo = 12;
method();
I don't think I completely understand the assignment alignment code, and that's
why
djasper added inline comments.
Comment at: unittests/Format/FormatTest.cpp:8619
@@ -8618,1 +8618,3 @@
+TEST_F(FormatTest, AlignConsecutiveDeclarations) {
+ FormatStyle Alignment = getLLVMStyle();
This needs tests that check what happens if both declarations and
berenm created this revision.
berenm added a reviewer: djasper.
berenm added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
This allows clang-format to align identifiers in consecutive declarations.
This is, arguably, a feature useful for increasing the readability of the code,
in
14 matches
Mail list logo