File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,10 @@ typet ansi_c_declarationt::full_type(
146
146
147
147
*p=type ();
148
148
149
+ // retain typedef for dump-c
150
+ if (get_is_typedef ())
151
+ result.set (ID_typedef,declarator.get_name ());
152
+
149
153
return result;
150
154
}
151
155
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ void c_typecheck_baset::typecheck_type(typet &type)
52
52
c_qualifiers+=c_qualifierst (type.subtype ());
53
53
bool packed=type.get_bool (ID_C_packed);
54
54
exprt alignment=static_cast <const exprt &>(type.find (ID_C_alignment));
55
+ irept _typedef=type.find (ID_typedef);
55
56
56
57
type.swap (type.subtype ());
57
58
@@ -60,6 +61,8 @@ void c_typecheck_baset::typecheck_type(typet &type)
60
61
type.set (ID_C_packed, true );
61
62
if (alignment.is_not_nil ())
62
63
type.add (ID_C_alignment, alignment);
64
+ if (_typedef.is_not_nil ())
65
+ type.add (ID_typedef, _typedef);
63
66
64
67
return ; // done
65
68
}
You can’t perform that action at this time.
0 commit comments