forked from OSchip/llvm-project
[clang-format][NFC] Put all state change into the for statement
Differential Revision: https://reviews.llvm.org/D116563
This commit is contained in:
parent
1da96f7449
commit
8f6af1d468
|
@ -1162,7 +1162,8 @@ unsigned UnwrappedLineFormatter::format(
|
|||
bool FirstLine = true;
|
||||
for (const AnnotatedLine *Line =
|
||||
Joiner.getNextMergedLine(DryRun, IndentTracker);
|
||||
Line; Line = NextLine, FirstLine = false) {
|
||||
Line; PrevPrevLine = PreviousLine, PreviousLine = Line, Line = NextLine,
|
||||
FirstLine = false) {
|
||||
const AnnotatedLine &TheLine = *Line;
|
||||
unsigned Indent = IndentTracker.getIndent();
|
||||
|
||||
|
@ -1252,8 +1253,6 @@ unsigned UnwrappedLineFormatter::format(
|
|||
}
|
||||
if (!DryRun)
|
||||
markFinalized(TheLine.First);
|
||||
PrevPrevLine = PreviousLine;
|
||||
PreviousLine = &TheLine;
|
||||
}
|
||||
PenaltyCache[CacheKey] = Penalty;
|
||||
return Penalty;
|
||||
|
|
Loading…
Reference in New Issue