Memory leak: Fixed one more unit test
This commit is contained in:
parent
3a39259472
commit
f347efd802
|
@ -788,6 +788,11 @@ void CheckMemoryLeakClass::CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const
|
||||||
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if continue ;"), 3), varname);
|
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if continue ;"), 3), varname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if ( findmatch(tok, "alloc ; if break ;") )
|
||||||
|
{
|
||||||
|
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if break ;"), 3), varname);
|
||||||
|
}
|
||||||
|
|
||||||
else if ( findmatch(tok, "alloc ; if return ;") )
|
else if ( findmatch(tok, "alloc ; if return ;") )
|
||||||
{
|
{
|
||||||
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if return ;"), 3), varname);
|
MemoryLeak(Tokenizer::gettok(findmatch(tok, "alloc ; if return ;"), 3), varname);
|
||||||
|
|
|
@ -89,7 +89,7 @@ private:
|
||||||
TEST_CASE( forwhile4 );
|
TEST_CASE( forwhile4 );
|
||||||
TEST_CASE( forwhile5 );
|
TEST_CASE( forwhile5 );
|
||||||
TEST_CASE( forwhile6 );
|
TEST_CASE( forwhile6 );
|
||||||
// TODO TEST_CASE( forwhile7 );
|
TEST_CASE( forwhile7 );
|
||||||
|
|
||||||
TEST_CASE( dowhile1 );
|
TEST_CASE( dowhile1 );
|
||||||
|
|
||||||
|
@ -494,7 +494,6 @@ private:
|
||||||
|
|
||||||
void forwhile7()
|
void forwhile7()
|
||||||
{
|
{
|
||||||
// TODO
|
|
||||||
check("void f()\n"
|
check("void f()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" for (int i = 0; i < j; i++)\n"
|
" for (int i = 0; i < j; i++)\n"
|
||||||
|
|
Loading…
Reference in New Issue