[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 82089. krasimir added a comment. Ready for review. - Split BreakableComment back into a BreakableBlockComment and BreakableLineCommentSection - Extract common reflow computation functionality - Put LastLineNeedsDecoration and Decoration and Prefix to the ap

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Next 2 steps: will implement a simple heuristic about some sorts of ascii-art types of things; next will branch and produce a version that takes the reflow state out of the BreakableComment classes and puts it in the breakProtrudingToken implementation. https://revie

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 82081. krasimir added a comment. - Put LastLineNeedsDecoration and Decoration and Prefix to the appropriate subclasses - Fixed a double indentation bug caused by the WhitespaceManager. https://reviews.llvm.org/D27754 Files: lib/Format/BreakableToken.cpp

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 81551. krasimir added a comment. - Split BreakableComment back into a BreakableBlockComment and BreakableLineCommentSection - Extract common reflow computation functionality https://reviews.llvm.org/D27754 Files: lib/Format/BreakableToken.cpp lib/Form

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1174-1175 LineIndex != EndIndex; ++LineIndex) { -if (!DryRun) - Token->replaceWhitespaceBefore(LineIndex, Whitespaces); +Token->replaceWhitespaceBefore(LineIndex, RemainingTokenColu

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:471 + WhitespaceManager &Whitespaces) { + if (Tok.is(TT_LineComment)) { +// If this is the first line of a token, inform Whitespace Manager about it. ---

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/BreakableToken.cpp:471 + WhitespaceManager &Whitespaces) { + if (Tok.is(TT_LineComment)) { +// If this is the first line of a token, inform Whitespace Manager about it. -