File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1787,11 +1787,11 @@ static Token * createAstAtToken(Token *tok)
17871787 }
17881788 }
17891789
1790- if (Token::Match (tok, " %type% %name%|*|&|&&|::" ) && !Token::Match (tok, " return|new|delete" )) {
1790+ if (Token::Match (tok, " %type%| %name%|*|&|&&|::" ) && !Token::Match (tok, " return|new|delete" )) {
17911791 int typecount = 0 ;
17921792 Token *typetok = tok;
17931793 while (Token::Match (typetok, " %type%|::|*|&|&&|<" )) {
1794- if (typetok->isName () && !Token::simpleMatch (typetok->previous (), " ::" ))
1794+ if (typetok->isName () && ( !Token::simpleMatch (typetok->previous (), " :: " ) || tok-> str () == " ::" ))
17951795 typecount++;
17961796 if (typetok->str () == " <" ) {
17971797 if (Token* closing = typetok->findClosingBracket ()) {
@@ -1811,7 +1811,7 @@ static Token * createAstAtToken(Token *tok)
18111811 !Token::Match (tok, " return|throw" ) &&
18121812 Token::Match (typetok->previous (), " %name% ( !!*" ) &&
18131813 typetok->previous ()->varId () == 0 &&
1814- !typetok->previous ()->isKeyword () &&
1814+ ( !typetok->previous ()->isKeyword () || typetok-> previous ()-> isOperatorKeyword () ) &&
18151815 (skipMethodDeclEnding (typetok->link ()) || Token::Match (typetok->link (), " ) ;|{" )))
18161816 return typetok;
18171817 }
You can’t perform that action at this time.
0 commit comments