Add regression test for #6669 Return value of malloc is reported not stored, while it is.
This commit is contained in:
parent
636bf75799
commit
7d8b62e615
|
@ -6122,6 +6122,12 @@ private:
|
||||||
" return 0;\n"
|
" return 0;\n"
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
// #6669
|
||||||
|
check("void foo(size_t size) {\n"
|
||||||
|
" void * res{malloc(size)};\n"
|
||||||
|
"}", "test.cpp", false, false, true, &settings);
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void redundantPointerOp() {
|
void redundantPointerOp() {
|
||||||
|
|
Loading…
Reference in New Issue