diff options
Diffstat (limited to 'clang-tools-extra/clangd/refactor/Rename.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/refactor/Rename.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/refactor/Rename.cpp b/clang-tools-extra/clangd/refactor/Rename.cpp index 98d6fd488bb..46fd19d29f2 100644 --- a/clang-tools-extra/clangd/refactor/Rename.cpp +++ b/clang-tools-extra/clangd/refactor/Rename.cpp @@ -45,10 +45,9 @@ renameWithinFile(ParsedAST &AST, llvm::StringRef File, Position Pos, llvm::StringRef NewName) { RefactoringResultCollector ResultCollector; ASTContext &ASTCtx = AST.getASTContext(); - const SourceManager &SourceMgr = ASTCtx.getSourceManager(); - SourceLocation SourceLocationBeg = - clangd::getBeginningOfIdentifier(AST, Pos, SourceMgr.getMainFileID()); - tooling::RefactoringRuleContext Context(ASTCtx.getSourceManager()); + SourceLocation SourceLocationBeg = clangd::getBeginningOfIdentifier( + AST, Pos, AST.getSourceManager().getMainFileID()); + tooling::RefactoringRuleContext Context(AST.getSourceManager()); Context.setASTContext(ASTCtx); auto Rename = clang::tooling::RenameOccurrences::initiate( Context, SourceRange(SourceLocationBeg), NewName); |

