@@ -7690,25 +7690,26 @@ void Tokenizer::simplifyInitVar()
7690
7690
continue;
7691
7691
7692
7692
if (Token::Match(tok, "%type% *|&| %name% (|{")) {
7693
- while(tok && !Token::Match(tok, "(|{"))
7693
+ while (tok && !Token::Match(tok, "(|{"))
7694
7694
tok = tok->next();
7695
- tok->isInitBracket(true);
7695
+ if (tok)
7696
+ tok->isInitBracket(true);
7696
7697
/* tok = initVar(tok);
7697
- } else if (Token::Match(tok, "%type% *| %name% ( %type% (")) {
7698
- const Token* tok2 = tok->tokAt(2);
7699
- if (!tok2->link())
7698
+ } else if (Token::Match(tok, "%type% *| %name% ( %type% (")) {
7699
+ const Token* tok2 = tok->tokAt(2);
7700
+ if (!tok2->link())
7700
7701
tok2 = tok2->next();
7701
- if (!tok2->link() || (tok2->link()->strAt(1) == ";" && !Token::simpleMatch(tok2->linkAt(2), ") (")))
7702
+ if (!tok2->link() || (tok2->link()->strAt(1) == ";" && !Token::simpleMatch(tok2->linkAt(2), ") (")))
7702
7703
tok = initVar(tok);
7703
- } else if (Token::Match(tok, "class|struct|union| %type% *| %name% ( &| %any% ) ,") && tok->str() != "new") {
7704
- Token *tok1 = tok->tokAt(5);
7705
- while (tok1->str() != ",")
7704
+ } else if (Token::Match(tok, "class|struct|union| %type% *| %name% ( &| %any% ) ,") && tok->str() != "new") {
7705
+ Token *tok1 = tok->tokAt(5);
7706
+ while (tok1->str() != ",")
7706
7707
tok1 = tok1->next();
7707
- tok1->str(";");
7708
+ tok1->str(";");
7708
7709
7709
- const int numTokens = (Token::Match(tok, "class|struct|union")) ? 2 : 1;
7710
- TokenList::insertTokens(tok1, tok, numTokens);
7711
- tok = initVar(tok); */
7710
+ const int numTokens = (Token::Match(tok, "class|struct|union")) ? 2 : 1;
7711
+ TokenList::insertTokens(tok1, tok, numTokens);
7712
+ tok = initVar(tok); */
7712
7713
}
7713
7714
}
7714
7715
}
0 commit comments