[Diagnostics][SourceKit] Expose diagnostic educational notes through SourceKit requests

This commit is contained in:
Owen Voorhees
2019-11-11 17:00:42 -08:00
parent dddcfb8348
commit f11df3ee22
6 changed files with 22 additions and 0 deletions

View File

@@ -110,6 +110,9 @@ void EditorDiagConsumer::handleDiagnostic(SourceManager &SM,
}
SKInfo.Description = Text.str();
for (auto notePath : Info.EducationalNotePaths)
SKInfo.EducationalNotePaths.push_back(notePath);
Optional<unsigned> BufferIDOpt;
if (Info.Loc.isValid()) {
BufferIDOpt = SM.findBufferContainingLoc(Info.Loc);