From b4ffb5e0cf6b411699519a02b70022a3c076d243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 22 Apr 2012 09:51:00 +0200 Subject: [PATCH] Tokenizer::setVarIdNew: Fixed TestTokenizer::varid39 test case --- lib/tokenize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 482945e74..d8b21f24e 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -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(); }