klimek added inline comments.
================ Comment at: lib/Format/ContinuationIndenter.cpp:1174-1175 LineIndex != EndIndex; ++LineIndex) { - if (!DryRun) - Token->replaceWhitespaceBefore(LineIndex, Whitespaces); + Token->replaceWhitespaceBefore(LineIndex, RemainingTokenColumns, + RemainingSpace, DryRun, Whitespaces); unsigned TailOffset = 0; ---------------- krasimir wrote: > klimek wrote: > > Nice that this whole section required so few changes. > > Why do we need to call into this in DryRun mode now, though? Does it need > > to keep state inside in DryRun? > Yes, replaceWhitespaceBefore recomputes the ContentColumn in case a reflow > with the previous line is decided to be made. > Basically, the whole reflow functionality is inside replaceWhitespaceBefore > now (except for a bit of control flow stuff, like updating the > ReflowInProgress member variable). For my curiosity: what's the reason we can't precompute those in the constructor? Is that too much things we do outside of the flow here? https://reviews.llvm.org/D27754 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits