diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 84710ee89..3ffdacace 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -628,12 +628,6 @@ void CheckMemoryLeakInFunction::parse_noreturn() } -bool CheckMemoryLeakInFunction::matchFunctionsThatReturnArg(const Token *tok, unsigned int varid) const -{ - return Token::Match(tok, "; %varid% = strcat|memcpy|memmove|strcpy ( %varid% ,", varid); -} - - bool CheckMemoryLeakInFunction::notvar(const Token *tok, unsigned int varid, bool endpar) const { const std::string end(endpar ? " &&|)" : " [;)&|]"); diff --git a/lib/checkmemoryleak.h b/lib/checkmemoryleak.h index 2a036efc7..e23090439 100644 --- a/lib/checkmemoryleak.h +++ b/lib/checkmemoryleak.h @@ -220,13 +220,6 @@ public: */ void parseFunctionScope(const Token *tok, const Token *tok1, const bool classmember); - /** - * @brief %Check if there is a "p = foo(p, .." and foo returns the argument (p) - * @param tok token to the ";" before the statement - * @param varid varid to check - */ - bool matchFunctionsThatReturnArg(const Token *tok, unsigned int varid) const; - /** * @brief %Check if there is a "!var" match inside a condition * @param tok first token to match