From 08b0fa21a7016374dc66c31c9b607ba2d0155d0f Mon Sep 17 00:00:00 2001 From: Jens Yllman Date: Thu, 18 Jun 2020 14:49:19 +0200 Subject: [PATCH] do not report locally declared functions as missing configuration for --check-library --- lib/checkfunctions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 75bd18c46..5f9e5d45c 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -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,