[clangd] consider ~^foo() to target the destructor, not the type
authorSam McCall <sam.mccall@gmail.com>
Tue, 18 Oct 2022 23:42:31 +0000 (01:42 +0200)
committerSam McCall <sam.mccall@gmail.com>
Wed, 19 Oct 2022 12:12:31 +0000 (14:12 +0200)
commit62116c8f0b5b7aac3d53f1bd2445356ae6866048
treecb2368a1f75c9f1ce2881116363728dc652aebe9
parent9708d88017d0c9adaea65a4f5a5b589b67f292e2
[clangd] consider ~^foo() to target the destructor, not the type

This behavior was once deliberate, but i've yet to find someone who likes it.
The reference behavior is unchanged: the `foo` within ~foo is still considered
a reference to the type. This means rename etc still works.

fixes https://github.com/clangd/clangd/issues/179

Differential Revision: https://reviews.llvm.org/D136212
clang-tools-extra/clangd/Selection.cpp
clang-tools-extra/clangd/unittests/SelectionTests.cpp