Browse Source

Fix ignore type checking to take type maps into account.

pull/1316/merge
João Matos 6 years ago committed by João Matos
parent
commit
15efafb942
  1. 19
      src/Generator/Types/TypeIgnoreChecker.cs

19
src/Generator/Types/TypeIgnoreChecker.cs

@ -27,6 +27,19 @@ namespace CppSharp @@ -27,6 +27,19 @@ namespace CppSharp
IsIgnored = true;
}
public override bool VisitType(Type type, TypeQualifiers quals)
{
TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(type, out typeMap)
&& typeMap.IsIgnored)
{
Ignore();
return false;
}
return base.VisitType(type, quals);
}
public override bool VisitPrimitiveType(PrimitiveType type, TypeQualifiers quals)
{
// we do not support long double yet because its high-level representation is often problematic
@ -46,6 +59,12 @@ namespace CppSharp @@ -46,6 +59,12 @@ namespace CppSharp
if (decl.CompleteDeclaration != null)
return VisitDeclaration(decl.CompleteDeclaration);
TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(decl, out typeMap))
{
return typeMap.IsIgnored;
}
if (!(decl is TypedefDecl) && !decl.IsGenerated)
{
Ignore();

Loading…
Cancel
Save