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.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/refactor/Tweak.cpp b/clang-tools-extra/clangd/refactor/Tweak.cpp
index 4f3c40d1eb1..2dc091ed762 100644
--- a/clang-tools-extra/clangd/refactor/Tweak.cpp
+++ b/clang-tools-extra/clangd/refactor/Tweak.cpp
@@ -9,6 +9,7 @@
#include "Logger.h"
#include "Path.h"
#include "SourceCode.h"
+#include "index/Index.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
@@ -44,9 +45,10 @@ void validateRegistry() {
}
} // namespace
-Tweak::Selection::Selection(ParsedAST &AST, unsigned RangeBegin,
- unsigned RangeEnd)
- : AST(AST), SelectionBegin(RangeBegin), SelectionEnd(RangeEnd),
+Tweak::Selection::Selection(const SymbolIndex *Index, ParsedAST &AST,
+ unsigned RangeBegin, unsigned RangeEnd)
+ : Index(Index), AST(AST), SelectionBegin(RangeBegin),
+ SelectionEnd(RangeEnd),
ASTSelection(AST.getASTContext(), AST.getTokens(), RangeBegin, RangeEnd) {
auto &SM = AST.getSourceManager();
Code = SM.getBufferData(SM.getMainFileID());
OpenPOWER on IntegriCloud