[Migrator] Handle function decl renames. rdar://31766131 (#9157)

This commit is contained in:
Xi Ge
2017-05-02 10:53:56 -07:00
committed by GitHub
parent 89d50e366f
commit 39c550fc40
8 changed files with 86 additions and 1 deletions

View File

@@ -148,3 +148,8 @@ bool EditorAdapter::replaceWithInner(SourceRange TokenRange,
auto CharInnerRange = Lexer::getCharSourceRangeFromSourceRange(SwiftSrcMgr, TokenInnerRange);
return replaceWithInner(CharRange, CharInnerRange);
}
bool EditorAdapter::replaceToken(SourceLoc TokenLoc, StringRef Text) {
return replace(Lexer::getTokenAtLocation(SwiftSrcMgr, TokenLoc).getRange(),
Text);
}