Fixed #506 (###### If you see this, there is a bug ###### Token::Match())

This commit is contained in:
Daniel Marjamäki 2009-07-26 11:46:00 +02:00
parent 0e61395a63
commit ea49b433ec
1 changed files with 3 additions and 0 deletions

View File

@ -1139,6 +1139,9 @@ void CheckOther::postIncrement()
tok2 = tok2->tokAt(-3);
if (Token::Match(tok2, "; %var% ++|-- )"))
{
if (tok2->next()->varId() == 0)
continue;
// Take a look at the variable declaration
const Token *decltok = Token::findmatch(_tokenizer->tokens(), "%varid%", tok2->tokAt(1)->varId());
const std::string classDef = std::string("class ") + std::string(decltok->previous()->strAt(0));