[clangd] Add basic conflict detection for the rename.
authorHaojian Wu <hokein.wu@gmail.com>
Tue, 10 Nov 2020 07:49:57 +0000 (08:49 +0100)
committerHaojian Wu <hokein.wu@gmail.com>
Tue, 10 Nov 2020 07:52:30 +0000 (08:52 +0100)
commitdaa736da10fd340d63fa828e86e4f4bd6961d6f3
tree0002bb423925dd63dee8a6a8d7187e8f865f3392
parent724877e219cd219c4b757f10ac4484193cd30c6a
[clangd] Add basic conflict detection for the rename.

With this patch, we reject the rename if the new name would conflict with
any other decls in the decl context of the renamed decl.

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