value flow: improved subfunction handling when using && or || in function argument
This commit is contained in:
parent
9c50deda64
commit
26a72d73fe
|
@ -206,7 +206,7 @@ static void valueFlowSubFunction(TokenList *tokenlist, ErrorLogger *errorLogger,
|
|||
const Token *op = tok->next();
|
||||
while (op && op->astParent() && !Token::Match(op->astParent(), "[(,]"))
|
||||
op = op->astParent();
|
||||
if (op && (op->isComparisonOp() || op->str() == "!")) {
|
||||
if (Token::Match(op, "%comp%|%oror%|&&|!")) {
|
||||
argvalues.clear();
|
||||
argvalues.push_back(ValueFlow::Value(0));
|
||||
argvalues.push_back(ValueFlow::Value(1));
|
||||
|
|
Loading…
Reference in New Issue