Skip to content

Commit 99067de

Browse files
author
thk123
committed
If a type has a typedef then use that when printing the type
1 parent 08cf4ee commit 99067de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ansi-c/expr2c.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ std::string expr2ct::convert_rec(
232232
std::string d=
233233
declarator==""?declarator:" "+declarator;
234234

235+
if(src.find(ID_typedef).is_not_nil())
236+
{
237+
return q+id2string(src.get(ID_typedef))+d;
238+
}
239+
235240
if(src.id()==ID_bool)
236241
{
237242
return q+"_Bool"+d;

0 commit comments

Comments
 (0)