[SourceKit] Honor #sourceLocation in reporting diagnostics

This commit is contained in:
Jordan Rose
2018-08-29 09:24:10 -07:00
parent c06dc63654
commit 9a794531c7
3 changed files with 16 additions and 1 deletions

View File

@@ -146,7 +146,7 @@ void EditorDiagConsumer::handleDiagnostic(
SKInfo.Offset = SM.getLocOffsetInBuffer(Loc, BufferID);
std::tie(SKInfo.Line, SKInfo.Column) = SM.getLineAndColumn(Loc, BufferID);
SKInfo.Filename = SM.getIdentifierForBuffer(BufferID);
SKInfo.Filename = SM.getDisplayNameForLoc(Loc);
for (auto R : Info.Ranges) {
if (R.isInvalid() || SM.findBufferContainingLoc(R.getStart()) != BufferID)