Skip to content

Commit 8459cab

Browse files
committed
Fix printing of type defs in C++
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 9aa8ad3 commit 8459cab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Generator/Generators/C/CppTypePrinter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ public override TypePrinterResult VisitPrimitiveType(PrimitiveType primitive, Ty
179179
public override TypePrinterResult VisitTypedefType(TypedefType typedef, TypeQualifiers quals)
180180
{
181181
FunctionType func;
182-
if (ResolveTypedefs && !typedef.Declaration.Type.IsPointerTo(out func))
183-
return typedef.Declaration.Type.Visit(this, quals);
184182
var qual = GetStringQuals(quals);
183+
if (ResolveTypedefs && !typedef.Declaration.Type.IsPointerTo(out func))
184+
return $"{qual}{typedef.Declaration.QualifiedType.Visit(this)}";
185185
return $"{qual}{typedef.Declaration.Visit(this)}";
186186
}
187187

0 commit comments

Comments
 (0)