Fixed #1214 (false positive: uninitialized variable 'bool fixed = std::ios_base::fixed;')
This commit is contained in:
parent
38b480a4b5
commit
1032eb2449
|
@ -1568,7 +1568,7 @@ private:
|
|||
if (Token::Match(tok2, "%var% ("))
|
||||
break;
|
||||
if (tok2->varId() &&
|
||||
!Token::simpleMatch(tok2->previous(), "&") &&
|
||||
!Token::Match(tok2->previous(), "&|::") &&
|
||||
!Token::simpleMatch(tok2->next(), "="))
|
||||
use(foundError, checks, tok2);
|
||||
}
|
||||
|
|
|
@ -1034,6 +1034,12 @@ private:
|
|||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkUninitVar("void foo()\n"
|
||||
"{\n"
|
||||
" int x = xyz::x;\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
checkUninitVar("static int foo()\n"
|
||||
"{\n"
|
||||
" int ret;\n"
|
||||
|
|
Loading…
Reference in New Issue