summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/refactor/Tweak.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/refactor/Tweak.cpp')
-rw-r--r--clang-tools-extra/clangd/refactor/Tweak.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/refactor/Tweak.cpp b/clang-tools-extra/clangd/refactor/Tweak.cpp
index 435c36e91ef..3e3033ce5c7 100644
--- a/clang-tools-extra/clangd/refactor/Tweak.cpp
+++ b/clang-tools-extra/clangd/refactor/Tweak.cpp
@@ -46,10 +46,10 @@ void validateRegistry() {
} // namespace
Tweak::Selection::Selection(const SymbolIndex *Index, ParsedAST &AST,
- unsigned RangeBegin, unsigned RangeEnd)
+ unsigned RangeBegin, unsigned RangeEnd,
+ SelectionTree ASTSelection)
: Index(Index), AST(&AST), SelectionBegin(RangeBegin),
- SelectionEnd(RangeEnd),
- ASTSelection(AST.getASTContext(), AST.getTokens(), RangeBegin, RangeEnd) {
+ SelectionEnd(RangeEnd), ASTSelection(std::move(ASTSelection)) {
auto &SM = AST.getSourceManager();
Code = SM.getBufferData(SM.getMainFileID());
Cursor = SM.getComposedLoc(SM.getMainFileID(), RangeBegin);
OpenPOWER on IntegriCloud