diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 8b5ee03c4..810122784 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -427,7 +427,7 @@ void CheckFunctions::checkLibraryMatchFunctions() reportError(tok, Severity::information, "checkLibraryFunction", - "--check-library: There is no matching configuration for function " + tok->str() + "()"); + "--check-library: There is no matching configuration for function " + _settings->library.getFunctionName(tok) + "()"); } } } diff --git a/lib/library.h b/lib/library.h index b5109567b..c4c3b9156 100644 --- a/lib/library.h +++ b/lib/library.h @@ -429,6 +429,11 @@ public: return (it2 != platform_types.end()) ? &(it2->second) : nullptr; } + /** + * Get function name for function call + */ + std::string getFunctionName(const Token *ftok) const; + private: // load a xml node Error loadFunction(const tinyxml2::XMLElement * const node, const std::string &name, std::set &unknown_elements); @@ -510,7 +515,6 @@ private: const ArgumentChecks * getarg(const Token *ftok, int argnr) const; std::string getFunctionName(const Token *ftok, bool *error) const; - std::string getFunctionName(const Token *ftok) const; static const AllocFunc* getAllocDealloc(const std::map &data, const std::string &name) { const std::map::const_iterator it = data.find(name);