private static bool ContainsXmlParseDiagnostic(DocumentationCommentTriviaSyntax node) { if (!node.ContainsDiagnostics) { return false; } foreach (Diagnostic diag in node.GetDiagnostics()) { if ((ErrorCode)diag.Code == ErrorCode.WRN_XMLParseError) { return true; } } return false; }