Tokenizer: More specific bailout in simplifyKnownVariables for loop variable

This commit is contained in:
Daniel Marjamäki 2010-11-07 17:20:03 +01:00
parent cd94fa89e0
commit 7e9bb62dff
1 changed files with 6 additions and 0 deletions

View File

@ -5844,6 +5844,12 @@ bool Tokenizer::simplifyKnownVariables()
continue; continue;
} }
if (Token::Match(tok2->tokAt(-2), "for ("))
{
// skip loop variable
continue;
}
if (tok2->str() == tok2->strAt(2)) if (tok2->str() == tok2->strAt(2))
continue; continue;