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 fea194b commit f6e471cCopy full SHA for f6e471c
lib/valueflow.cpp
@@ -4604,11 +4604,15 @@ struct ConditionHandler {
4604
if (Token::Match(tok, ":|;|,"))
4605
continue;
4606
4607
+ std::vector<Condition> conditions = parse(tok, settings);
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%|?|!"))
4614
- for (const Condition& cond : parse(tok, settings)) {
4615
+ for (const Condition& cond : conditions) {
4616
if (!cond.vartok)
4617
4618
if (cond.vartok->exprId() == 0)
0 commit comments