Revert "Combine overlapping patterns"

This reverts commit 123f9b67e0.
This commit is contained in:
Dmitry-Me 2017-08-26 08:18:24 +03:00
parent 123f9b67e0
commit cc97834e88
1 changed files with 2 additions and 1 deletions

View File

@ -4358,7 +4358,8 @@ bool Tokenizer::removeRedundantConditions()
void Tokenizer::removeRedundantFor()
{
for (Token *tok = list.front(); tok; tok = tok->next()) {
if (Token::Match(tok, "[;{}] for ( %type%| %name% = %num% ; %name% < %num% ; ++| %name% ++| ) {")) {
if (Token::Match(tok, "[;{}] for ( %name% = %num% ; %name% < %num% ; ++| %name% ++| ) {") ||
Token::Match(tok, "[;{}] for ( %type% %name% = %num% ; %name% < %num% ; ++| %name% ++| ) {")) {
// Same variable name..
const Token* varTok = tok->tokAt(3);
bool type = varTok->next()->isName();