[SourceKit] Remove newName from RenameLoc

We should (and do) have one new name for the entire rename operation, not a separate new name for different positions at which the renamed symbol occurs.
This commit is contained in:
Alex Hoppen
2023-11-13 16:12:40 -08:00
parent bc3c8fc47a
commit d095d0a186
9 changed files with 70 additions and 78 deletions

View File

@@ -110,8 +110,7 @@ getNotableRegions(StringRef SourceText, unsigned NameOffset, StringRef Name,
RenameLoc RenameConfig = {LineAndCol.first, LineAndCol.second,
NameUsage::Definition, /*OldName=*/Name,
/*NewName=*/"", IsFunctionLike,
IsNonProtocolType};
IsFunctionLike, IsNonProtocolType};
RenameRangeDetailCollector Renamer(SM, Name);
Renamer.addSyntacticRenameRanges(Resolved.back(), RenameConfig);
auto Ranges = Renamer.Ranges;