Skip to content

[sourcekitd] Capture diagnostics with invalid locations for compile notifications #15782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 6, 2018

Conversation

benlangmuir
Copy link
Contributor

Stop filtering out diagnostics with invalid locations in the editor diagnostic consumer, and instead capture them separately so that we can include them in did-compile notifications.

rdar://39225000

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test

@benlangmuir benlangmuir requested review from akyrtzi and nathawes April 5, 2018 23:56
Copy link
Contributor

@nathawes nathawes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

continue;
unsigned Offset = SM.getLocOffsetInBuffer(F.getRange().getStart(),
BufferID);
*BufferID);
unsigned Length = F.getRange().getByteLength();
SKInfo.Fixits.push_back({ Offset, Length, F.getText() });
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this makes much difference, so up to you, but I thought the above might be more readable with a top-level if (BufferId) { check for non-input buffer, set filename + offset + ranges + fixits } else { set unknown filename }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point. I'll do that.

…otifications

Stop filtering out diagnostics with invalid locations in the editor
diagnostic consumer, and instead capture them separately so that we can
include them in did-compile notifications.

rdar://39225000
@benlangmuir benlangmuir force-pushed the invalid-diag-loc-note branch from 407de49 to 969f0f4 Compare April 6, 2018 18:36
@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants