[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-28 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309370: clang-format: merge short case labels with trailing comments (authored by Typz). Repository: rL LLVM https://reviews.llvm.org/D35557 Files: cfe/trunk/lib/Format/UnwrappedLineFormatter.cpp

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! Thanks! https://reviews.llvm.org/D35557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 107841. Typz marked 4 inline comments as done. Typz added a comment. Address review comments https://reviews.llvm.org/D35557 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-23 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: unittests/Format/FormatTest.cpp:912 + " break;\n" + "}", + Style); krasimir wrote: > I'd suggest adding more cases here, like: > ``` >"case 6: /* comment */ x = 1;

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineFormatter.cpp:405 +for (; J != E; ++J) { + const AnnotatedLine *Line = J[0]; + if (Line->InPPDirective != InPPDirective) I'd change `J[0]` to `*J` and rename `Line` to

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. Allow merging short case labels when they actually end with a comment (like a comment after the ``break``) and when followed by switch-level comments (e.g. aligned with next case): switch(a) { case 0: break; // comment at end of