File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ class TestSimplifyTypedef : public TestFixture {
229229 TEST_CASE (simplifyTypedef156);
230230 TEST_CASE (simplifyTypedef157);
231231 TEST_CASE (simplifyTypedef158);
232+ TEST_CASE (simplifyTypedef159);
232233
233234 TEST_CASE (simplifyTypedefFunction1);
234235 TEST_CASE (simplifyTypedefFunction2); // ticket #1685
@@ -3803,6 +3804,13 @@ class TestSimplifyTypedef : public TestFixture {
38033804 TODO_ASSERT_EQUALS (exp, cur, tok (code));
38043805 }
38053806
3807+ void simplifyTypedef159 () {
3808+ const char code[] = " typedef void (*const func_t)();\n " // #14387
3809+ " func_t g() { return nullptr; }\n " ;
3810+ const char exp[] = " void * const g ( ) { return nullptr ; }" ;
3811+ ASSERT_EQUALS (exp, tok (code));
3812+ }
3813+
38063814 void simplifyTypedefFunction1 () {
38073815 {
38083816 const char code[] = " typedef void (*my_func)();\n "
You can’t perform that action at this time.
0 commit comments