public static void IgnoreFunctionsWithParameterTypeName(this ASTContext context, string matchTypeName) { foreach (TranslationUnit unit in context.TranslationUnits) { foreach (Function function in unit.Functions) { if (function.Parameters.Any( p => { Type type = p.Type; // depointer if (type.IsPointer()) { type = ((PointerType)type).Pointee; } string typeName; if (type is TypedefType) { typeName = ((TypedefType)type).Declaration.Name; } else { typeName = type.ToString(); } bool match = typeName == matchTypeName; return(match); })) { function.ExplicityIgnored = true; } } } }
public override string ToString() { return(Type.ToString()); }