mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Ignore references without a location
A keypath using dynamic member lookup results in various `KeyPathExpr` that have components with no location. Ignore these and any other references that have a missing location. Resolves rdar://85237365
This commit is contained in:
@@ -959,6 +959,9 @@ public:
|
||||
}
|
||||
|
||||
void annotate(const Decl *D, bool IsRef, CharSourceRange Range) {
|
||||
if (!Range.isValid())
|
||||
return;
|
||||
|
||||
unsigned ByteOffset = SM.getLocOffsetInBuffer(Range.getStart(), BufferID);
|
||||
unsigned Length = Range.getByteLength();
|
||||
auto Kind = CodeCompletionResult::getCodeCompletionDeclKind(D);
|
||||
|
||||
Reference in New Issue
Block a user