[SourceKit] Merge local refactoring implementations

Retrieving local rename ranges and the local rename refactoring both had
almost identical methods, except for the addition of retrieving the
outermost shadowed decl that was added a couple months back. Merge them.

Resolves rdar://106529370.
This commit is contained in:
Ben Barham
2023-03-10 12:32:11 -08:00
parent 5f8338f8ef
commit d2de8ed83c
7 changed files with 187 additions and 166 deletions

View File

@@ -148,9 +148,8 @@ struct RenameRefInfo {
bool IsArgLabel; ///< Whether Loc is on an arg label, rather than base name.
};
void collectRenameAvailabilityInfo(
const ValueDecl *VD, Optional<RenameRefInfo> RefInfo,
llvm::SmallVectorImpl<RenameAvailabilityInfo> &Infos);
Optional<RenameAvailabilityInfo>
renameAvailabilityInfo(const ValueDecl *VD, Optional<RenameRefInfo> RefInfo);
} // namespace ide
} // namespace swift