mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[RangeInfo] When reporting referenced decls in a given range, exclude those references accessed as members.
This commit is contained in:
@@ -423,7 +423,12 @@ public:
|
||||
return ResolvedRangeInfo();
|
||||
}
|
||||
|
||||
void analyzeDeclRef(ValueDecl *VD, CharSourceRange Range, Type Ty) {
|
||||
void analyzeDeclRef(ValueDecl *VD, CharSourceRange Range, Type Ty,
|
||||
SemaReferenceKind Kind) {
|
||||
// Only collect decl ref.
|
||||
if (Kind != SemaReferenceKind::DeclRef)
|
||||
return;
|
||||
|
||||
if (!isContainedInSelection(Range))
|
||||
return;
|
||||
|
||||
@@ -509,7 +514,7 @@ bool RangeResolver::walkToDeclPost(Decl *D) {
|
||||
bool RangeResolver::
|
||||
visitDeclReference(ValueDecl *D, CharSourceRange Range, TypeDecl *CtorTyRef,
|
||||
Type T, SemaReferenceKind Kind) {
|
||||
Impl->analyzeDeclRef(D, Range, T);
|
||||
Impl->analyzeDeclRef(D, Range, T, Kind);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user