fix a symbol database bug where a return statement could be considered a variable declaration

This commit is contained in:
Robert Reif 2011-02-27 10:13:40 -05:00
parent e3f779a41c
commit 0872f1291e
1 changed files with 8 additions and 0 deletions

View File

@ -1363,6 +1363,14 @@ void Scope::getVariableList()
else if (tok->str() == "__property")
continue;
// skip return
else if (tok->str() == "return")
{
while (tok->next()->str() != ";")
tok = tok->next();
continue;
}
// Search for start of statement..
else if (tok->previous() && !Token::Match(tok->previous(), ";|{|}|public:|protected:|private:"))
continue;