Fixed incorrect usage of startOfExecutableScope() (Checking time reduced by ~60% (nonlinear) for #5876)

This commit is contained in:
PKEuS 2014-06-05 10:26:04 +02:00
parent f7f639465a
commit f6c9320aee
1 changed files with 2 additions and 1 deletions

View File

@ -7150,7 +7150,7 @@ void Tokenizer::simplifyReference()
if (start) {
tok = start;
// replace references in this scope..
Token * const end = tok->next()->link();
Token * const end = tok->link();
for (Token *tok2 = tok; tok2 && tok2 != end; tok2 = tok2->next()) {
// found a reference..
if (Token::Match(tok2, "[;{}] %type% & %var% (|= %var% )| ;")) {
@ -7169,6 +7169,7 @@ void Tokenizer::simplifyReference()
tok2->deleteNext(6+(tok->strAt(6)==")" ? 1 : 0));
}
}
tok = end;
}
}
}