Skip to content

Commit ba0df47

Browse files
committed
C++ front-end: store typedef names
1 parent dc7b8c8 commit ba0df47

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/cpp/cpp_declarator_converter.h

+11-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,17 @@ class cpp_declarator_convertert
4444
const cpp_declarationt &declaration,
4545
cpp_declaratort &declarator)
4646
{
47-
return convert(
48-
declaration.type(),
49-
declaration.storage_spec(),
50-
declaration.member_spec(),
51-
declarator);
47+
symbolt &result=
48+
convert(
49+
declaration.type(),
50+
declaration.storage_spec(),
51+
declaration.member_spec(),
52+
declarator);
53+
54+
if(declaration.is_typedef())
55+
result.type.set(ID_C_typedef, result.name);
56+
57+
return result;
5258
}
5359

5460
class cpp_typecheckt &cpp_typecheck;

0 commit comments

Comments
 (0)