public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (typedef.TranslationUnit.Module?.LibraryName == _moduleName)
            {
                if (typedef.Type.Desugar() is FunctionType)
                {
                    typedef.ExplicitlyIgnore();
                }
                else if (typedef.Type.Desugar().IsPointerTo <FunctionType>(out _))
                {
                    typedef.ExplicitlyIgnore();
                }
            }

            return(base.VisitTypedefDecl(typedef));
        }
Example #2
0
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            var @class = typedef.Namespace.FindClass(typedef.Name);

            // Clang will walk the typedef'd tag decl and the typedef decl,
            // so we ignore the class and process just the typedef.

            if (@class != null)
            {
                typedef.ExplicitlyIgnore();
            }

            if (typedef.Type == null)
            {
                typedef.ExplicitlyIgnore();
            }

            return(base.VisitTypedefDecl(typedef));
        }
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!base.VisitTypedefDecl(typedef))
            {
                return(false);
            }

            if (typedef.TranslationUnit.IsSystemHeader)
            {
                typedef.ExplicitlyIgnore();
            }

            return(true);
        }
Example #4
0
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (typedef.TranslationUnit.Module?.LibraryName == _moduleName)
            {
                if (typedef.Type.Desugar() is FunctionType ||
                    typedef.Type.Desugar().IsPointerTo <FunctionType>(out _))
                {
                    if (!_declaredDelegates.Contains(typedef.OriginalName))
                    {
                        typedef.ExplicitlyIgnore();
                    }
                }
            }

            return(base.VisitTypedefDecl(typedef));
        }
Example #5
0
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!VisitDeclaration(typedef))
            {
                return(false);
            }

            string msg;

            if (HasInvalidType(typedef.Type, out msg))
            {
                typedef.ExplicitlyIgnore();
                Diagnostics.Debug("Typedef '{0}' was ignored due to {1} type",
                                  typedef.Name, msg);
                return(false);
            }

            return(true);
        }
Example #6
0
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!VisitDeclaration(typedef))
            {
                return(false);
            }

            string msg;

            if (HasInvalidType(typedef.Type, typedef.TranslationUnit.Module, out msg) &&
                !(typedef.Type.Desugar() is MemberPointerType))
            {
                typedef.ExplicitlyIgnore();
                Diagnostics.Debug("Typedef '{0}' was ignored due to {1} type",
                                  typedef.Name, msg);
                return(false);
            }

            return(true);
        }
Example #7
0
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!VisitDeclaration(typedef))
                return false;

            string msg;
            if (HasInvalidType(typedef.Type, out msg))
            {
                typedef.ExplicitlyIgnore();
                Log.Debug("Typedef '{0}' was ignored due to {1} type",
                    typedef.Name, msg);
                return false;
            }

            return true;
        }
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            var @class = typedef.Namespace.FindClass(typedef.Name);

            // Clang will walk the typedef'd tag decl and the typedef decl,
            // so we ignore the class and process just the typedef.

            if (@class != null)
                typedef.ExplicitlyIgnore();

            if (typedef.Type == null)
                typedef.ExplicitlyIgnore();

            return base.VisitTypedefDecl(typedef);
        }
        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!base.VisitTypedefDecl(typedef))
                return false;

            if (typedef.TranslationUnit.IsSystemHeader)
                typedef.ExplicitlyIgnore();

            return true;
        }