diff --git a/src/Generator/Types/TypeMapDatabase.cs b/src/Generator/Types/TypeMapDatabase.cs index 08167959..3b73a81c 100644 --- a/src/Generator/Types/TypeMapDatabase.cs +++ b/src/Generator/Types/TypeMapDatabase.cs @@ -63,6 +63,7 @@ namespace CppSharp.Types if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) { + typeMap.Declaration = decl; typeMap.Type = type; return true; } @@ -70,6 +71,7 @@ namespace CppSharp.Types typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified; if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) { + typeMap.Declaration = decl; typeMap.Type = type; return true; } @@ -77,6 +79,7 @@ namespace CppSharp.Types typePrinter.ResolveTypedefs = true; if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) { + typeMap.Declaration = decl; typeMap.Type = type; return true; } @@ -85,6 +88,7 @@ namespace CppSharp.Types typePrinter.PrintScopeKind = TypePrintScopeKind.Local; if (FindTypeMap(decl.Visit(typePrinter), out typeMap)) { + typeMap.Declaration = decl; typeMap.Type = type; return true; } @@ -93,6 +97,7 @@ namespace CppSharp.Types if (specialization != null && FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap)) { + typeMap.Declaration = decl; typeMap.Type = type; return true; }