value flow: improved subfunction handling when using && or || in function argument

This commit is contained in:
Daniel Marjamäki 2014-01-08 16:49:15 +01:00
parent 9c50deda64
commit 26a72d73fe
1 changed files with 1 additions and 1 deletions

View File

@ -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));