Typz added a comment.

For one thing, we need to update the state to store the "decision" of the 
reflowing mode, which is performed only in DryRun=true mode, to avoid doing the 
computation multiple times.

Apart from this, the decision is conceptually internal to 
breakProtrudingToken(). But the 'computation' of either mode is very similar, 
and updates the state variable anyway (State.Column, Stack.back().LastSpace, 
State.Stack[i].BreakBeforeParameter, Token->updateNextToken(State)) : so it is 
simpler (code-wise) to split the function and call it twice, then decide which 
'State' variable to use.


https://reviews.llvm.org/D33589



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to