Tokenizer: Fixed 'variableScope' message.

This commit is contained in:
Daniel Marjamäki 2013-03-18 19:32:40 +01:00
parent 1b18bfc93c
commit cc3139cf39
1 changed files with 1 additions and 1 deletions

View File

@ -4980,7 +4980,6 @@ void Tokenizer::simplifyVarDecl(bool only_k_r_fpar)
bool isconst = false;
bool isstatic = false;
bool ispointer = false;
Token *tok2 = type0;
unsigned int typelen = 1;
@ -5084,6 +5083,7 @@ void Tokenizer::simplifyVarDecl(bool only_k_r_fpar)
//pattern: "%type% *| ... *| const| %var% ,|="
if (Token::Match(tok2, "%type%") ||
(tok2 && tok2->previous() && tok2->previous()->str() == ">")) {
bool ispointer = false;
Token *varName = tok2;
if (!tok2->previous() || tok2->previous()->str() != ">")
varName = varName->next();