1 parent be9d33c commit bef5e67Copy full SHA for bef5e67
1 file changed
lib/checkother.cpp
@@ -4446,7 +4446,7 @@ void CheckOtherImpl::checkKnownPointerToBool()
4446
for (const Token* tok = functionScope->bodyStart; tok != functionScope->bodyEnd; tok = tok->next()) {
4447
if (!tok->hasKnownIntValue())
4448
continue;
4449
- if (!astIsPointer(tok))
+ if (!astIsPointer(tok) && !tok->function())
4450
4451
if (Token::Match(tok->astParent(), "?|!|&&|%oror%|%comp%"))
4452
0 commit comments