Skip to content

Commit 0af202f

Browse files
Update tokenize.cpp
1 parent c221f52 commit 0af202f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5017,8 +5017,8 @@ void Tokenizer::setVarIdPass1()
50175017
// there are tokens which can't appear at the begin of a function declaration such as "return"
50185018
const bool isNotstartKeyword = start->next() && notstart.find(start->strAt(1)) != notstart.end();
50195019

5020-
// now check if it is a function declaration
5021-
if (Token::Match(start, "[;{}] %type% %name%|*") && par && Token::simpleMatch(end, ") ;") && !isNotstartKeyword) {
5020+
// now check if it is a function (pointer) declaration
5021+
if ((Token::simpleMatch(start, ") (") || Token::Match(start, "[;{}] %type% %name%|*")) && par && Token::Match(end, ") [;=]") && !isNotstartKeyword) {
50225022
// function declaration => don't set varid
50235023
tok = end;
50245024
continue;

0 commit comments

Comments
 (0)