Permalink
Browse files

Set the declaration of found type maps.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
  • Loading branch information...
ddobrev committed Aug 4, 2017
1 parent 0e341db commit aab4e6587a1451ec40df4c3a80cf2364984f92f4
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/Generator/Types/TypeMapDatabase.cs
@@ -63,20 +63,23 @@ public bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap)
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
typePrinter.ResolveTypedefs = true;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@@ -85,6 +88,7 @@ public bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap)
typePrinter.PrintScopeKind = TypePrintScopeKind.Local;
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}
@@ -93,6 +97,7 @@ public bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap)
if (specialization != null &&
FindTypeMap(specialization.TemplatedDecl.Visit(typePrinter), out typeMap))
{
typeMap.Declaration = decl;
typeMap.Type = type;
return true;
}

0 comments on commit aab4e65

Please sign in to comment.