Skip to content

Commit 7895bd3

Browse files
committed
Rename
1 parent 4d4426e commit 7895bd3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎lib/forwardanalyzer.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,8 @@ namespace {
534534
return branch;
535535
}
536536

537-
// Walk the block that the evaluated condition takes
538-
Progress updateTakenBranch(Token* endBlock, const Token* skippedBlock, const Token* condTok, const Token* ifEnd, int depth)
537+
// The condition was evaluated: walk the one block of the if that it selects
538+
Progress updateSingleIfBranch(Token* endBlock, const Token* skippedBlock, const Token* condTok, const Token* ifEnd, int depth)
539539
{
540540
// The condition is only "known" because of an earlier assumption, so the
541541
// skipped block could still modify the value -> lower to possible
@@ -602,7 +602,7 @@ namespace {
602602

603603
// Neither outcome of the condition is known: the then block is walked on a fork, the else
604604
// block on this traversal.
605-
Progress updateBothBranches(const Token* condTok, Token* thenEnd, Token* elseEnd, const Token* end, int depth, bool split)
605+
Progress updateIfBranches(const Token* condTok, Token* thenEnd, Token* elseEnd, const Token* end, int depth, bool split)
606606
{
607607
const bool conditional = stopOnCondition(condTok);
608608
Token* ifEnd = elseEnd ? elseEnd : thenEnd;
@@ -1060,12 +1060,12 @@ namespace {
10601060
Token* elseEnd = Token::simpleMatch(endBlock, "} else {") ? endBlock->linkAt(2) : nullptr;
10611061
tok = elseEnd ? elseEnd : endBlock;
10621062
if (checkThen) {
1063-
if (updateTakenBranch(endBlock, elseEnd, condTok, tok, depth) == Progress::Break)
1063+
if (updateSingleIfBranch(endBlock, elseEnd, condTok, tok, depth) == Progress::Break)
10641064
return Break();
10651065
} else if (checkElse) {
1066-
if (updateTakenBranch(elseEnd, endBlock, condTok, tok, depth) == Progress::Break)
1066+
if (updateSingleIfBranch(elseEnd, endBlock, condTok, tok, depth) == Progress::Break)
10671067
return Break();
1068-
} else if (updateBothBranches(condTok, endBlock, elseEnd, end, depth, split && canFork()) == Progress::Break) {
1068+
} else if (updateIfBranches(condTok, endBlock, elseEnd, end, depth, split && canFork()) == Progress::Break) {
10691069
return Break();
10701070
}
10711071
}

0 commit comments

Comments
 (0)