Fixed #1360 (false positive:: uninitialized class member of nested class inside a function)

This commit is contained in:
Daniel Marjamäki 2010-02-08 18:06:28 +01:00
parent 7e2e20c2d3
commit 19589adc1d
1 changed files with 6 additions and 2 deletions

View File

@ -137,8 +137,12 @@ static const Token *checkExecutionPaths_(const Token *tok, std::list<ExecutionPa
}
// don't parse into "struct type { .."
if (Token::Match(tok, "struct %type% {"))
tok = tok->tokAt(2)->link();
if (Token::Match(tok, "struct|class %type% {|:"))
{
while (tok && tok->str() != "{" && tok->str() != ";")
tok = tok->next();
tok = tok ? tok->link() : 0;
}
if (Token::Match(tok, "= {"))
{