Skip to content

Commit bef5e67

Browse files
Update checkother.cpp
1 parent be9d33c commit bef5e67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/checkother.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4446,7 +4446,7 @@ void CheckOtherImpl::checkKnownPointerToBool()
44464446
for (const Token* tok = functionScope->bodyStart; tok != functionScope->bodyEnd; tok = tok->next()) {
44474447
if (!tok->hasKnownIntValue())
44484448
continue;
4449-
if (!astIsPointer(tok))
4449+
if (!astIsPointer(tok) && !tok->function())
44504450
continue;
44514451
if (Token::Match(tok->astParent(), "?|!|&&|%oror%|%comp%"))
44524452
continue;

0 commit comments

Comments
 (0)