We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ConditionHandler::traverseCondition()
1 parent f6e471c commit f75bdd9Copy full SHA for f75bdd9
lib/valueflow.cpp
@@ -4608,10 +4608,9 @@ struct ConditionHandler {
4608
if (conditions.empty())
4609
continue;
4610
4611
- const Token* top = tok->astTop();
4612
-
4613
- if (!Token::Match(top->previous(), "if|while|for (") && !Token::Match(tok->astParent(), "&&|%oror%|?|!"))
+ if (!Token::Match(tok->astParent(), "&&|%oror%|?|!") && !Token::Match(tok->astTop()->previous(), "if|while|for ("))
4614
+
4615
for (const Condition& cond : conditions) {
4616
if (!cond.vartok)
4617
0 commit comments