diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index b137eb0ca..4ce6a918e 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -920,13 +920,13 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::listvarId() == varid || + if (tok2->varId() == varid || tok2->str() == ":") { break; } } - + if (skipToToken) { tok = skipToToken; @@ -1112,9 +1112,9 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::liststrAt(2) == "(") - tok = tok->tokAt(2)->link(); + tok = tok->tokAt(2)->link(); continue; } } @@ -1320,7 +1320,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list 0) { unsigned int parlevel2 = 0; @@ -1342,7 +1342,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::liststr() == "do"))