Added test case for false positive, fails currently
This commit is contained in:
parent
0e51bc3669
commit
dd7e012509
|
@ -1044,6 +1044,15 @@ private:
|
||||||
" free(a - 10);\n"
|
" free(a - 10);\n"
|
||||||
"}\n" );
|
"}\n" );
|
||||||
|
|
||||||
|
ASSERT_EQUALS( std::string(""), errout.str() );
|
||||||
|
|
||||||
|
check( "void foo()\n"
|
||||||
|
"{\n"
|
||||||
|
" char *a = (char *)malloc(10);\n"
|
||||||
|
" a = a + 10;\n"
|
||||||
|
" free(a - 10);\n"
|
||||||
|
"}\n" );
|
||||||
|
|
||||||
ASSERT_EQUALS( std::string(""), errout.str() );
|
ASSERT_EQUALS( std::string(""), errout.str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue