Fixed incorrect usage of startOfExecutableScope() (Checking time reduced by ~60% (nonlinear) for #5876)
This commit is contained in:
parent
f7f639465a
commit
f6c9320aee
|
@ -7150,7 +7150,7 @@ void Tokenizer::simplifyReference()
|
||||||
if (start) {
|
if (start) {
|
||||||
tok = start;
|
tok = start;
|
||||||
// replace references in this scope..
|
// 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()) {
|
for (Token *tok2 = tok; tok2 && tok2 != end; tok2 = tok2->next()) {
|
||||||
// found a reference..
|
// found a reference..
|
||||||
if (Token::Match(tok2, "[;{}] %type% & %var% (|= %var% )| ;")) {
|
if (Token::Match(tok2, "[;{}] %type% & %var% (|= %var% )| ;")) {
|
||||||
|
@ -7169,6 +7169,7 @@ void Tokenizer::simplifyReference()
|
||||||
tok2->deleteNext(6+(tok->strAt(6)==")" ? 1 : 0));
|
tok2->deleteNext(6+(tok->strAt(6)==")" ? 1 : 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tok = end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue