1 parent 50b9a36 commit 67eb159Copy full SHA for 67eb159
1 file changed
lib/vf_settokenvalue.cpp
@@ -426,22 +426,6 @@ namespace ValueFlow
426
setTokenValue(parent, std::move(value), settings);
427
}
428
} else if (!value.isImpossible()) {
429
- // is condition only depending on 1 variable?
430
- nonneg int varId = 0;
431
- bool ret = false;
432
- visitAstNodes(parent->astOperand1(),
433
- [&](const Token *t) {
434
- if (t->varId()) {
435
- if (varId > 0 || value.varId != 0)
436
- ret = true;
437
- varId = t->varId();
438
- } else if (t->str() == "(" && Token::Match(t->previous(), "%name%"))
439
- ret = true; // function call
440
- return ret ? ChildrenToVisit::done : ChildrenToVisit::op1_and_op2;
441
- });
442
- if (ret)
443
- return;
444
-
445
value.conditional = true;
446
value.changeKnownToPossible();
447
0 commit comments