[SourceKit] Include generated macro buffers in diagnostic responses

Introduce a new key `generated_buffers`, which
stores an array of generated buffers. These
include the buffer text, as well as its original
location and any parent buffers.

While here, also fix rdar://107281079 such that
only apply the filename fallback logic to the
pretty-printed Decl case. We ought to remove this
fallback once the editor can handle it though.

rdar://107281079
rdar://107952288
This commit is contained in:
Hamish Knight
2023-05-02 16:21:44 +01:00
parent 100244a0c3
commit 62b021030f
15 changed files with 979 additions and 145 deletions

View File

@@ -86,9 +86,8 @@ class NullEditorConsumer : public EditorConsumer {
bool diagnosticsEnabled() override { return false; }
void setDiagnosticStage(UIdent DiagStage) override {}
void handleDiagnostic(const DiagnosticEntryInfo &Info,
UIdent DiagStage) override {}
void handleDiagnostics(ArrayRef<DiagnosticEntryInfo> DiagInfos,
UIdent DiagStage) override {}
void recordFormattedText(StringRef Text) override {}
void handleSourceText(StringRef Text) override {}