File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -576,7 +576,7 @@ namespace {
576576 continue ;
577577 if (tok->str () != mNameToken ->str ())
578578 continue ;
579- if (nBraces > 0 && Token::simpleMatch (tok->next (), " ; " ))
579+ if (nBraces > 0 && Token::Match (tok->next (), " [;(] " ))
580580 continue ;
581581 if (Token::Match (tok->previous (), " struct|class|enum|union" ))
582582 continue ;
Original file line number Diff line number Diff line change @@ -3882,6 +3882,9 @@ class TestSimplifyTypedef : public TestFixture {
38823882
38833883 const char code2[] = " typedef struct { int t; } t;" ; // #14966
38843884 ASSERT_EQUALS (" struct t { int t ; } ;" , tok (code2));
3885+
3886+ const char code3[] = " typedef struct S { S() {} } S;" ; // #14971
3887+ ASSERT_EQUALS (" struct S { S ( ) { } } ;" , tok (code3));
38853888 }
38863889
38873890 void simplifyTypedefFunction1 () {
You can’t perform that action at this time.
0 commit comments