Tokenizer::setVarIdNew: Fixed TestTokenizer::varid39 test case

This commit is contained in:
Daniel Marjamäki 2012-04-22 09:51:00 +02:00
parent ed6673a9aa
commit b4ffb5e0cf
1 changed files with 1 additions and 1 deletions

View File

@ -3016,7 +3016,7 @@ void Tokenizer::setVarIdNew()
const bool decl = setVarIdParseDeclaration(&tok2, variableId, executableScope.top());
if (decl && Token::Match(tok2->previous(), "%type% [;[=,)]")) {
if (decl && Token::Match(tok2->previous(), "%type% [;[=,)]") && tok2->previous()->str() != "const") {
variableId[tok2->previous()->str()] = ++_varId;
tok = tok2->previous();
}