diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index ca1f46263..8af580ebf 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -99,7 +99,7 @@ void CheckFunctions::invalidFunctionUsage() while (Token::Match(var, ".|::")) var = var->astOperand2(); if (Token::Match(top, "%comp%|%oror%|&&|!|true|false") || - (var && var->variable() && Token::Match(var->variable()->typeStartToken(), "bool"))) { + (var && var->variable() && Token::simpleMatch(var->variable()->typeStartToken(), "bool"))) { if (_settings->library.isboolargbad(functionToken, argnr)) invalidFunctionArgBoolError(top, functionToken->str(), argnr);