Skip to content

Commit 83d7131

Browse files
Update valueflow.cpp
1 parent 03dc79f commit 83d7131

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/valueflow.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5166,7 +5166,8 @@ static void valueFlowInferCondition(TokenList& tokenlist, const Settings& settin
51665166
}
51675167
} else if (Token::Match(tok->astParent(), "?|&&|!|%oror%") ||
51685168
Token::Match(tok->astParent()->previous(), "if|while (") ||
5169-
((astIsPointer(tok) || tok->function()) && isUsedAsBool(tok, settings))) {
5169+
(astIsPointer(tok) && isUsedAsBool(tok, settings)) ||
5170+
tok->function()) {
51705171
std::vector<ValueFlow::Value> result = infer(makeIntegralInferModel(), "!=", tok->values(), 0);
51715172
if (result.size() != 1)
51725173
continue;

0 commit comments

Comments
 (0)