File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1765,9 +1765,18 @@ static Token * createAstAtToken(Token *tok)
17651765 if (Token::Match (tok, " %type% %name%|*|&|&&|::" ) && !Token::Match (tok, " return|new|delete" )) {
17661766 int typecount = 0 ;
17671767 Token *typetok = tok;
1768- while (Token::Match (typetok, " %type%|::|*|&|&&" )) {
1768+ while (Token::Match (typetok, " %type%|::|*|&|&&|< " )) {
17691769 if (typetok->isName () && !Token::simpleMatch (typetok->previous (), " ::" ))
17701770 typecount++;
1771+ if (typetok->str () == " <" ) {
1772+ if (Token* closing = typetok->findClosingBracket ()) {
1773+ typetok = closing->next ();
1774+ if (Token::simpleMatch (typetok, " ::" ))
1775+ typetok = typetok->next ();
1776+ continue ;
1777+ }
1778+ break ;
1779+ }
17711780 typetok = typetok->next ();
17721781 }
17731782 if (Token::Match (typetok, " %var% =" ) && typetok->varId ())
You can’t perform that action at this time.
0 commit comments