From 45759f6f7d96f2a237bfdb789c7ea72494d47182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 14 Mar 2012 18:54:34 +0100 Subject: [PATCH] CheckMemoryLeak: report debug warning when variable id is 0. Ticket #3527 --- lib/checkmemoryleak.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index b78e3ba5c..064336a47 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -2559,8 +2559,10 @@ void CheckMemoryLeakInClass::checkPublicFunctions(const Scope *scope, const Toke return; 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; + } // Parse public functions.. // If they allocate member variables, they should also deallocate