CheckMemoryLeak: report debug warning when variable id is 0. Ticket #3527

This commit is contained in:
Daniel Marjamäki 2012-03-14 18:54:34 +01:00
parent 4f3878eb1e
commit 45759f6f7d
1 changed files with 3 additions and 1 deletions

View File

@ -2559,8 +2559,10 @@ void CheckMemoryLeakInClass::checkPublicFunctions(const Scope *scope, const Toke
return; return;
const unsigned int varid = classtok->varId(); const unsigned int varid = classtok->varId();
if (varid == 0) if (varid == 0) {
_tokenizer->getSymbolDatabase()->debugMessage(classtok, "CheckMemoryInClass::checkPublicFunctions found variable \'" + classtok->str() + "\' with varid 0");
return; return;
}
// Parse public functions.. // Parse public functions..
// If they allocate member variables, they should also deallocate // If they allocate member variables, they should also deallocate