#3873 added testcase to make sure false positive does not appear again.
This commit is contained in:
parent
abde1d0ec1
commit
8c39b95aae
|
@ -541,6 +541,15 @@ private:
|
|||
" return if\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// Ticket #3873 (false positive)
|
||||
checkUninitVar("MachineLoopRange *MachineLoopRanges::getLoopRange(const MachineLoop *Loop) {\n"
|
||||
" MachineLoopRange *&Range = Cache[Loop];\n"
|
||||
" if (!Range)\n"
|
||||
" Range = new MachineLoopRange(Loop, Allocator, *Indexes);\n"
|
||||
" return Range;\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void uninitvar3() { // #3844
|
||||
|
|
Loading…
Reference in New Issue