summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/ClangdServer.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2019-10-18 14:57:11 +0200
committerKadir Cetinkaya <kadircet@google.com>2019-10-28 07:55:58 +0100
commitf4d7caf6df819d18b4d5b460d21f7f8fe1e1b705 (patch)
tree1b51621610a39223df8cc9198742d21b727bed58 /clang-tools-extra/clangd/ClangdServer.cpp
parent3d65def1fd2febe5c1748de6f5ce009712e88f31 (diff)
downloadbcm5719-llvm-f4d7caf6df819d18b4d5b460d21f7f8fe1e1b705.tar.gz
bcm5719-llvm-f4d7caf6df819d18b4d5b460d21f7f8fe1e1b705.zip
[clangd] Reland Store Index in Tweak::Selection
Summary: Incoming define out-of-line tweak requires access to index. This patch simply propogates the index in ClangdServer to Tweak::Selection while passing the AST. Also updates TweakTest to accommodate this change. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69165
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
-rw-r--r--clang-tools-extra/clangd/ClangdServer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index 4f1fe8f5b08..64ccbe417c2 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -367,7 +367,7 @@ tweakSelection(const Range &Sel, const InputsAndAST &AST) {
auto End = positionToOffset(AST.Inputs.Contents, Sel.end);
if (!End)
return End.takeError();
- return Tweak::Selection(AST.AST, *Begin, *End);
+ return Tweak::Selection(AST.Inputs.Index, AST.AST, *Begin, *End);
}
void ClangdServer::enumerateTweaks(PathRef File, Range Sel,
OpenPOWER on IntegriCloud