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

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 20 03:40:50 PST 2016


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 appropriate subclasses
- Fixed a double indentation bug caused by the WhitespaceManager.
- Implement a simple heuristic to detect ascii-art to stop reflow early


https://reviews.llvm.org/D27754

Files:
  lib/Format/BreakableToken.cpp
  lib/Format/BreakableToken.h
  lib/Format/CMakeLists.txt
  lib/Format/Comments.cpp
  lib/Format/Comments.h
  lib/Format/ContinuationIndenter.cpp
  lib/Format/TokenAnnotator.cpp
  lib/Format/UnwrappedLineParser.cpp
  lib/Format/WhitespaceManager.cpp
  unittests/Format/FormatTest.cpp
  unittests/Format/FormatTestSelective.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27754.82089.patch
Type: text/x-patch
Size: 76097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161220/c4e62bda/attachment-0001.bin>


More information about the cfe-commits mailing list