[PATCH] D33394: [clang-format] Keep trailing preprocessor line comments separate from the following section comments

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 03:00:21 PDT 2017


krasimir marked an inline comment as done.
krasimir added inline comments.


================
Comment at: lib/Format/UnwrappedLineParser.cpp:106
+             isLineComment(*Token) && Token->NewlinesBefore == 1 &&
+             Token->OriginalColumn == PreviousToken->OriginalColumn);
   }
----------------
djasper wrote:
> Any chance of moving this logic to distributeComments? I think that's the place we previously tried to encapsulate this logic in. If not, this is fine for now.
Because of the way parsing around macros works, moving this to distributeComments is gonna be super-tricky: I tried this approach first for a while and gave up. However, I can extract the common logic here and in continuesLineComment at least.


https://reviews.llvm.org/D33394





More information about the cfe-commits mailing list