public static void ReportUndeclaredType(this ICollection<Diagnostic> diagnostics, SyntaxNode type) { diagnostics.Report(type.GetTextSpanSafe(), DiagnosticId.UndeclaredType, type.ToStringIgnoringMacroReferences()); }