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