do not report locally declared functions as missing configuration for --check-library

This commit is contained in:
Jens Yllman 2020-06-18 14:49:19 +02:00
parent 9320ac287a
commit 08b0fa21a7
1 changed files with 4 additions and 1 deletions

View File

@ -436,11 +436,14 @@ void CheckFunctions::checkLibraryMatchFunctions()
if (tok->linkAt(1)->strAt(1) == "(")
continue;
if (tok->function())
continue;
if (!mSettings->library.isNotLibraryFunction(tok))
continue;
const std::string &functionName = mSettings->library.getFunctionName(tok);
if (functionName.empty() || mSettings->library.functions.find(functionName) == mSettings->library.functions.end())
if (functionName.empty() || mSettings->library.functions.find(functionName) != mSettings->library.functions.end())
continue;
reportError(tok,