@@ -2790,7 +2790,7 @@ bool Tokenizer::isMemberFunction(const Token *openParen)
27902790{
27912791 return (Token::Match (openParen->tokAt (-2 ), " :: %name% (" ) ||
27922792 Token::Match (openParen->tokAt (-3 ), " :: ~ %name% (" )) &&
2793- TokenList::isFunctionHead (openParen, " {| :" );
2793+ TokenList::isFunctionHead (openParen, " {:" );
27942794}
27952795
27962796static bool scopesMatch (const std::string &scope1, const std::string &scope2, const ScopeInfo3 *globalScope)
@@ -4356,7 +4356,7 @@ static void setVarIdStructMembers(Token *&tok1,
43564356 while (Token::Match (tok->next (), " )| . %name% !!(" )) {
43574357 // Don't set varid for trailing return type
43584358 if (tok->strAt (1 ) == " )" && Token::Match (tok->linkAt (1 )->tokAt (-1 ), " %name%|]" ) && !tok->linkAt (1 )->tokAt (-1 )->isKeyword () &&
4359- TokenList::isFunctionHead (tok->linkAt (1 ), " {| ;" )) {
4359+ TokenList::isFunctionHead (tok->linkAt (1 ), " {;" )) {
43604360 tok = tok->tokAt (3 );
43614361 continue ;
43624362 }
@@ -8976,7 +8976,7 @@ void Tokenizer::simplifyFunctionTryCatch()
89768976 for (Token * tok = list.front (); tok; tok = tok->next ()) {
89778977 if (!Token::Match (tok, " try {|:" ))
89788978 continue ;
8979- if (!TokenList::isFunctionHead (tok->previous (), " try" ))
8979+ if (!TokenList::isFunctionHead (tok->previous (), " try" )) // TODO: this is supposed to a list of characters and not strings
89808980 continue ;
89818981
89828982 Token* tryStartToken = skipInitializerList (tok->next ());
@@ -9418,7 +9418,7 @@ void Tokenizer::simplifyCPPAttribute()
94189418 head = skipCPPOrAlignAttribute (head)->next ();
94199419 while (Token::Match (head, " %name%|::|*|&|<|>|," )) // skip return type
94209420 head = head->next ();
9421- if (head && head->str () == " (" && TokenList::isFunctionHead (head, " {| ;" )) {
9421+ if (head && head->str () == " (" && TokenList::isFunctionHead (head, " {;" )) {
94229422 head->previous ()->isAttributeNoreturn (true );
94239423 }
94249424 } else if (Token::findsimplematch (tok->tokAt (2 ), " nodiscard" , tok->link ())) {
@@ -9427,7 +9427,7 @@ void Tokenizer::simplifyCPPAttribute()
94279427 head = skipCPPOrAlignAttribute (head)->next ();
94289428 while (Token::Match (head, " %name%|::|*|&|<|>|," ))
94299429 head = head->next ();
9430- if (head && head->str () == " (" && TokenList::isFunctionHead (head, " {| ;" )) {
9430+ if (head && head->str () == " (" && TokenList::isFunctionHead (head, " {;" )) {
94319431 head->previous ()->isAttributeNodiscard (true );
94329432 }
94339433 } else if ((hasMaybeUnusedUnderscores && Token::findsimplematch (tok->tokAt (2 ), " __maybe_unused__" , tok->link ()))
@@ -10226,7 +10226,7 @@ void Tokenizer::createSymbolDatabase()
1022610226bool Tokenizer::operatorEnd (const Token * tok)
1022710227{
1022810228 if (tok && tok->str () == " )" ) {
10229- if (TokenList::isFunctionHead (tok, " {|;|?|:| [" ))
10229+ if (TokenList::isFunctionHead (tok, " {;?: [" ))
1023010230 return true ;
1023110231
1023210232 tok = tok->next ();
0 commit comments