Skip to content

Commit 67eb159

Browse files
Update vf_settokenvalue.cpp
1 parent 50b9a36 commit 67eb159

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

lib/vf_settokenvalue.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -426,22 +426,6 @@ namespace ValueFlow
426426
setTokenValue(parent, std::move(value), settings);
427427
}
428428
} 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-
445429
value.conditional = true;
446430
value.changeKnownToPossible();
447431

0 commit comments

Comments
 (0)