Skip to content

Commit 4af3a04

Browse files
committed
fix #14106
1 parent 7da9ff7 commit 4af3a04

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9209,7 +9209,8 @@ void Tokenizer::simplifyStructDecl()
92099209
}
92109210

92119211
// check for initialization
9212-
if (Token::Match(after, "%any% (|{")) {
9212+
bool isFuncDecl = Token::Match(after, "%name% (") && Token::simpleMatch(after->linkAt(1), ") {");
9213+
if (Token::Match(after, "%any% (|{") && !isFuncDecl) {
92139214
after->insertToken("=");
92149215
after = after->next();
92159216
const bool isEnum = start->str() == "enum";

0 commit comments

Comments
 (0)