fix tokenizer and symbol database to not mistake goto statement for variable declaration

This commit is contained in:
Robert Reif 2011-10-07 08:11:48 -04:00
parent 7dd001c9a9
commit a1a839fadc
2 changed files with 8 additions and 0 deletions

View File

@ -1697,6 +1697,11 @@ void Scope::getVariableList()
continue;
else if (Token::Match(tok, ";|{|}"))
continue;
else if (Token::Match(tok, "goto %var% ;"))
{
tok = tok->next()->next();
continue;
}
tok = checkVariable(tok, varaccess);

View File

@ -3737,6 +3737,9 @@ void Tokenizer::setVarId()
continue;
}
if (Token::Match(tok, "goto %any% ;"))
continue;
if (Token::Match(tok, "else|return|typedef|delete|sizeof"))
continue;