[PATCH] D72638: [clangd] Fix rename for explicit destructor calls

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 20 11:40:56 PST 2020


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:905
+               public:
+                 ~$1^Foo() {}
+
----------------
kadircet wrote:
> this actually looks troublesome, since we are not returning the functiondecl anymore(also for references to it as well), even though it is explicitly spelled in the source code.
> I suppose it is OK to keep that behavior for now, as there are no callers caring about those typednames yet.
> 
> just thinking out loud:
> In case we start to have such clients, it might be more principled to report `$1~$2Foo` in here(I know it is the old behavior :/ )  and handle those differently in the callers' with
> custom needs.
As discussed, I agree with this point and it's kind of unfortunate behaviour but we already have that for destructor declaration, too (see above `FIXME`) and in several other cases. Might want to fix that in the future though!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72638/new/

https://reviews.llvm.org/D72638





More information about the cfe-commits mailing list