[clangd] Store Index in Tweak::Selection
authorKadir Cetinkaya <kadircet@google.com>
Fri, 18 Oct 2019 12:57:11 +0000 (14:57 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Fri, 25 Oct 2019 10:15:20 +0000 (12:15 +0200)
commit8aa84ad37db7ddbff5c1a2e4ef8ff2a616f1da57
tree901df33f96a42de24fee1acbac16983555d5ff63
parentd62e3ed3f4b9e1c7492194d0c9997147bdfe6aa6
[clangd] 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
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/refactor/Tweak.cpp
clang-tools-extra/clangd/refactor/Tweak.h
clang-tools-extra/clangd/unittests/TweakTesting.cpp
clang-tools-extra/clangd/unittests/TweakTesting.h