[clangd] Rename constructors and destructors in cross-file case
authorKirill Bobyrev <kbobyrev@google.com>
Thu, 12 Dec 2019 12:10:59 +0000 (13:10 +0100)
committerKirill Bobyrev <kbobyrev@google.com>
Thu, 12 Dec 2019 12:10:59 +0000 (13:10 +0100)
commitec618826dfb91c5413353ebcc54f360e43df10a0
treee68a6c52dd582e55bd478f6e5cb62337571a4ee6
parent8ddcd1dc26bad9d97bbf34cf4fc91dbf3c153431
[clangd] Rename constructors and destructors in cross-file case

* Use ad-hoc Decl canonicalization from Clang-Rename to allow renaming
  constructors and destructors while using cross-file rename.
* Manually handle the destructor selection
* Add unit tests to prevent regressions and ensure the correct behaviour

Reviewed by: sammccall

Differential Revision: https://reviews.llvm.org/D71247
clang-tools-extra/clangd/refactor/Rename.cpp
clang-tools-extra/clangd/unittests/RenameTests.cpp