djasper accepted this revision. djasper added inline comments. This revision is now accepted and ready to land.
================ Comment at: lib/Format/UnwrappedLineParser.cpp:106 + isLineComment(*Token) && Token->NewlinesBefore == 1 && + Token->OriginalColumn == PreviousToken->OriginalColumn); } ---------------- krasimir wrote: > 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. Yeah. Much nicer. Thank you. ================ Comment at: lib/Format/UnwrappedLineParser.cpp:119 return Token && Token->HasUnescapedNewline && - !(PreviousToken && isLineComment(*PreviousToken) && - isLineComment(*Token) && Token->NewlinesBefore == 1); + !(continuesLineComment(*Token, PreviousToken, + /*MinColumnToken=*/PreviousToken)); ---------------- Remove parentheses? https://reviews.llvm.org/D33394 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits