Skip to content

Commit f88bafa

Browse files
Update testsimplifytypedef.cpp
1 parent b14fd3e commit f88bafa

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/testsimplifytypedef.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)