mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Teach the related-id checker to ignore things from other buffers
This commit is contained in:
@@ -2398,6 +2398,10 @@ private:
|
||||
}
|
||||
|
||||
bool passId(CharSourceRange Range) {
|
||||
// FIXME: Ignore things that don't come from this buffer.
|
||||
if (!SourceMgr.getRangeForBuffer(BufferID).contains(Range.getStart()))
|
||||
return !Cancelled;
|
||||
|
||||
unsigned Offset = SourceMgr.getLocOffsetInBuffer(Range.getStart(),BufferID);
|
||||
Ranges.insert({Offset, Range.getByteLength()});
|
||||
return !Cancelled;
|
||||
|
||||
Reference in New Issue
Block a user