Browse Source

Added CheckIgnoredDeclsPass.CheckDecayedTypes option.

This is used for Embeddinator-4000 and could be removed once we improve our support for custom types.
pull/778/head
Joao Matos 9 years ago
parent
commit
3b6cfd70f5
  1. 5
      src/Generator/Passes/CheckIgnoredDecls.cs

5
src/Generator/Passes/CheckIgnoredDecls.cs

@ -7,6 +7,8 @@ namespace CppSharp.Passes
{ {
public class CheckIgnoredDeclsPass : TranslationUnitPass public class CheckIgnoredDeclsPass : TranslationUnitPass
{ {
public bool CheckDecayedTypes { get; set; } = true;
public bool CheckDeclarationAccess(Declaration decl) public bool CheckDeclarationAccess(Declaration decl)
{ {
var generateNonPublicDecls = Options.IsCSharpGenerator; var generateNonPublicDecls = Options.IsCSharpGenerator;
@ -135,6 +137,8 @@ namespace CppSharp.Passes
return false; return false;
} }
if (CheckDecayedTypes)
{
var decayedType = param.Type.Desugar() as DecayedType; var decayedType = param.Type.Desugar() as DecayedType;
if (decayedType != null) if (decayedType != null)
{ {
@ -143,6 +147,7 @@ namespace CppSharp.Passes
function.Name); function.Name);
return false; return false;
} }
}
if (param.Kind == ParameterKind.IndirectReturnType) if (param.Kind == ParameterKind.IndirectReturnType)
{ {

Loading…
Cancel
Save