#3873 added testcase to make sure false positive does not appear again.

This commit is contained in:
Ettl Martin 2012-06-24 00:00:15 +02:00
parent abde1d0ec1
commit 8c39b95aae
1 changed files with 9 additions and 0 deletions

View File

@ -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