mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -100,10 +100,10 @@ private:
|
||||
|
||||
bool diagnosticsEnabled() override { return true; }
|
||||
|
||||
void setDiagnosticStage(UIdent diagStage) override { DiagStage = diagStage; }
|
||||
void handleDiagnostic(const DiagnosticEntryInfo &Info,
|
||||
UIdent DiagStage) override {
|
||||
Diags.push_back(Info);
|
||||
void handleDiagnostics(ArrayRef<DiagnosticEntryInfo> DiagInfos,
|
||||
UIdent DiagStage) override {
|
||||
this->DiagStage = DiagStage;
|
||||
Diags.insert(Diags.end(), DiagInfos.begin(), DiagInfos.end());
|
||||
}
|
||||
|
||||
void handleSourceText(StringRef Text) override {}
|
||||
|
||||
Reference in New Issue
Block a user