Fixed #2003 (false positive in set functions)

This commit is contained in:
Robert Reif 2010-08-31 17:59:17 +02:00 committed by Daniel Marjamäki
parent 5aab602709
commit 4463f650d0
1 changed files with 9 additions and 0 deletions

View File

@ -660,6 +660,8 @@ void CheckClass::SpaceInfo::getVarList()
vartok = next->tokAt(3);
else if (Token::Match(next, "%type% :: %type% * %var% ;"))
vartok = next->tokAt(4);
else if (Token::Match(next, "%type% :: %type% :: %type% * %var% ;"))
vartok = next->tokAt(6);
// Array?
else if (Token::Match(next, "%type% %var% [") && next->next()->str() != "operator")
@ -675,6 +677,8 @@ void CheckClass::SpaceInfo::getVarList()
vartok = next->tokAt(2);
else if (Token::Match(next, "%type% :: %type% * %var% ["))
vartok = next->tokAt(4);
else if (Token::Match(next, "%type% :: %type% :: %type% * %var% ["))
vartok = next->tokAt(6);
// std::string..
else if (Token::Match(next, "%type% :: %type% %var% ;"))
@ -682,6 +686,11 @@ void CheckClass::SpaceInfo::getVarList()
isClass = true;
vartok = next->tokAt(3);
}
else if (Token::Match(next, "%type% :: %type% :: %type% %var% ;"))
{
isClass = true;
vartok = next->tokAt(5);
}
// Container..
else if (Token::Match(next, "%type% :: %type% <") ||