[PATCH] D29626: [clang-format] Break before a sequence of line comments aligned with the next line.

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 7 02:53:46 PST 2017


krasimir added a comment.

I feel that this is a bit too rough now; any suggestions on improving the architecture/design of this patch are welcome!



================
Comment at: lib/Format/UnwrappedLineParser.cpp:2206
+    const SmallVectorImpl<FormatToken *> &Comments,
+    const FormatToken* NextTok) {
   bool CommentsInCurrentLine = true;
----------------
Any suggestions on how to improve the code quality a bit if we stick with this design?


================
Comment at: lib/Format/UnwrappedLineParser.h:118
+  void organiseComments(const SmallVectorImpl<FormatToken *> &Comments,
+                        const FormatToken *NextTok);
   void flushComments(bool NewlineBeforeNext);
----------------
@djasper: considering what this code does, what would be a better name of this?


https://reviews.llvm.org/D29626





More information about the cfe-commits mailing list