Define error messages for --errorlist for CheckMemoryLeakNoVar class
This commit is contained in:
parent
81318b3f4a
commit
f3b1c46c7d
|
@ -452,15 +452,19 @@ public:
|
||||||
|
|
||||||
void check();
|
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:
|
private:
|
||||||
|
|
||||||
void functionCallLeak(const Token *loc, const std::string &alloc, const std::string &functionCall);
|
void functionCallLeak(const Token *loc, const std::string &alloc, const std::string &functionCall);
|
||||||
|
|
||||||
void missingAssignementLeak(const Token *loc, const std::string &alloc);
|
void missingAssignementLeak(const Token *loc, const std::string &alloc);
|
||||||
|
|
||||||
void getErrorMessages(ErrorLogger * /*errorLogger*/, const Settings * /*settings*/) const
|
|
||||||
{ }
|
|
||||||
|
|
||||||
std::string myName() const {
|
std::string myName() const {
|
||||||
return "Memory leaks (address not taken)";
|
return "Memory leaks (address not taken)";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue