fix tokenizer and symbol database to not mistake goto statement for variable declaration
This commit is contained in:
parent
7dd001c9a9
commit
a1a839fadc
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue