[PATCH] D40310: Restructure how we break tokens.
Manuel Klimek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 29 04:32:43 PST 2017
klimek added inline comments.
================
Comment at: lib/Format/ContinuationIndenter.cpp:1749
+ }
+ if (!Reflow) {
+ // If we didn't reflow into the next line, the only space to consider is
----------------
krasimir wrote:
> nit: Maybe change this to `if (Reflow)` and switch the if-else bodies.
I had that first, but found that harder to follow when re-reading the code - if you feel strongly, I'm also happy to turn it around again :)
================
Comment at: lib/Format/ContinuationIndenter.cpp:1777
+ assert(Penalty >= NewBreakPenalty);
+ Penalty -= NewBreakPenalty;
+ }
----------------
krasimir wrote:
> Shouldn't we be resetting `NewBreakBefore` to `false` here?
NewBreakBefore is always reset at the start of the loop, so resetting it here wouldn't matter.
https://reviews.llvm.org/D40310
More information about the cfe-commits
mailing list