diff --git a/lib/checkmemoryleak.h b/lib/checkmemoryleak.h index 8cceca537..7fbec37e3 100644 --- a/lib/checkmemoryleak.h +++ b/lib/checkmemoryleak.h @@ -452,15 +452,19 @@ public: void check(); + void getErrorMessages(ErrorLogger *e, const Settings *settings) const { + CheckMemoryLeakNoVar c(0, settings, e); + + c.functionCallLeak(0, "funcName", "funcName"); + c.missingAssignementLeak(0, "funcName"); + } + private: void functionCallLeak(const Token *loc, const std::string &alloc, const std::string &functionCall); void missingAssignementLeak(const Token *loc, const std::string &alloc); - void getErrorMessages(ErrorLogger * /*errorLogger*/, const Settings * /*settings*/) const - { } - std::string myName() const { return "Memory leaks (address not taken)"; }