Skip to content

Commit f75bdd9

Browse files
committed
refs #12861 - reordered condition and inlined call in ConditionHandler::traverseCondition()
1 parent f6e471c commit f75bdd9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/valueflow.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4608,10 +4608,9 @@ struct ConditionHandler {
46084608
if (conditions.empty())
46094609
continue;
46104610

4611-
const Token* top = tok->astTop();
4612-
4613-
if (!Token::Match(top->previous(), "if|while|for (") && !Token::Match(tok->astParent(), "&&|%oror%|?|!"))
4611+
if (!Token::Match(tok->astParent(), "&&|%oror%|?|!") && !Token::Match(tok->astTop()->previous(), "if|while|for ("))
46144612
continue;
4613+
46154614
for (const Condition& cond : conditions) {
46164615
if (!cond.vartok)
46174616
continue;

0 commit comments

Comments
 (0)