Fixed the testcase TestMemleak::realloc3
This commit is contained in:
parent
7905cbc5e7
commit
06776c6ac7
|
@ -330,10 +330,11 @@ bool CheckMemoryLeakClass::notvar(const Token *tok, const char *varnames[], bool
|
|||
|
||||
const std::string end(endpar ? " )" : " [;)&|]");
|
||||
|
||||
return bool(Token::Match(tok, std::string("! " + varname + end).c_str()) ||
|
||||
Token::simpleMatch(tok, std::string("! ( " + varname + " )" + end).c_str()) ||
|
||||
Token::Match(tok, std::string("0 == " + varname + end).c_str()) ||
|
||||
Token::simpleMatch(tok, std::string(varname + " == 0" + end).c_str()));
|
||||
return bool(Token::Match(tok, ("! " + varname + end).c_str()) ||
|
||||
Token::Match(tok, ("! ( " + varname + " )" + end).c_str()) ||
|
||||
Token::Match(tok, ("0 == " + varname + end).c_str()) ||
|
||||
Token::Match(tok, (varname + " == 0" + end).c_str()) ||
|
||||
Token::Match(tok, ("( " + varname + " ) == 0" + end).c_str()));
|
||||
}
|
||||
|
||||
Token *CheckMemoryLeakClass::getcode(const Token *tok, std::list<const Token *> callstack, const char varname[], AllocType &alloctype, AllocType &dealloctype, bool classmember, bool &all, unsigned int sz)
|
||||
|
|
|
@ -164,7 +164,7 @@ private:
|
|||
|
||||
TEST_CASE(realloc1);
|
||||
TEST_CASE(realloc2);
|
||||
// TODO TEST_CASE(realloc3);
|
||||
TEST_CASE(realloc3);
|
||||
|
||||
TEST_CASE(assign);
|
||||
|
||||
|
|
Loading…
Reference in New Issue