Skip to content

Commit 8e0a83e

Browse files
committed
handle arrays in simplifyFunctionPointers
1 parent 882a794 commit 8e0a83e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,12 @@ namespace {
10251025
}
10261026

10271027
bool Tokenizer::isFunctionPointer(const Token* tok) {
1028-
return Token::Match(tok, "%name% ) (");
1028+
if (!Token::Match(tok, "%name%"))
1029+
return false;
1030+
tok = tok->next();
1031+
while (Token::Match(tok, "["))
1032+
tok = tok->link()->next();
1033+
return Token::simpleMatch(tok, ") (");
10291034
}
10301035

10311036
static bool matchCurrentType(const Token* tok, std::map<int, std::string>& types)

0 commit comments

Comments
 (0)