We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97ec6c6 commit 8be1784Copy full SHA for 8be1784
1 file changed
lib/tokenize.cpp
@@ -9205,7 +9205,8 @@ void Tokenizer::simplifyStructDecl()
9205
}
9206
9207
// check for initialization
9208
- if (Token::Match(after, "%any% (|{")) {
+ bool isFuncDecl = Token::Match(after, "%name% (") && Token::simpleMatch(after->linkAt(1), ") {");
9209
+ if (Token::Match(after, "%any% (|{") && !isFuncDecl) {
9210
after->insertToken("=");
9211
after = after->next();
9212
const bool isEnum = start->str() == "enum";
0 commit comments