Skip to content

Commit 44c05b1

Browse files
committed
fix
1 parent 2d9a26f commit 44c05b1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/tokenize.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,10 @@ void Tokenizer::simplifyTypedef()
10421042
std::map<std::string, std::set<std::string>> numberOfTypedefs;
10431043
for (Token* tok = list.front(); tok; tok = tok->next()) {
10441044
if (tok->str() == "typedef") {
1045+
if (Token::simpleMatch(tok, "typedef ( *") &&
1046+
tok->linkAt(1) && Token::simpleMatch(tok->linkAt(1), ") ("))
1047+
// Implicit return type
1048+
tok->insertToken("int");
10451049
TypedefSimplifier ts(tok);
10461050
if (ts.fail() || !ts.nameToken())
10471051
continue;

0 commit comments

Comments
 (0)