mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Honor #sourceLocation in reporting diagnostics
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user