diff --git a/src/Generator/Types/Types.cs b/src/Generator/Types/Types.cs index 2f068f68..eea3e46b 100644 --- a/src/Generator/Types/Types.cs +++ b/src/Generator/Types/Types.cs @@ -72,18 +72,19 @@ namespace CppSharp public override bool VisitDeclaration(Declaration decl) { - if (decl.Ignore) - Ignore(); + if (decl.CompleteDeclaration != null) + return VisitDeclaration(decl.CompleteDeclaration); - return true; - } + TypeMap typeMap; + if (TypeMapDatabase.FindTypeMap(decl, out typeMap)) + return typeMap.IsIgnored; - public override bool VisitClassDecl(Class @class) - { - if (AlreadyVisited(@class)) + if (!decl.IsGenerated) + { + Ignore(); return false; + } - VisitDeclaration(@class); return true; }