[SourceKit] Replace UnresolvedLoc by SourceLoc

`UnresolvedLoc` was just a wrapper around `SourceLoc` and isn’t needed anymore.
This commit is contained in:
Alex Hoppen
2023-11-13 16:15:44 -08:00
parent b3ab9bffd5
commit ba06b5c075
4 changed files with 16 additions and 22 deletions

View File

@@ -102,11 +102,8 @@ static std::vector<NoteRegion> getNotableRegions(StringRef SourceText,
SourceLoc NameLoc = SM.getLocForOffset(BufferId, NameOffset);
auto LineAndCol = SM.getLineAndColumnInBuffer(NameLoc);
UnresolvedLoc UnresoledName{NameLoc};
NameMatcher Matcher(*Instance->getPrimarySourceFile());
auto Resolved =
Matcher.resolve(llvm::makeArrayRef(UnresoledName), llvm::None);
auto Resolved = Matcher.resolve(llvm::makeArrayRef(NameLoc), llvm::None);
assert(!Resolved.empty() && "Failed to resolve generated func name loc");
RenameLoc RenameConfig = {LineAndCol.first, LineAndCol.second,