[PATCH] D136212: [clangd] consider ~^foo() to target the destructor, not the type

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 05:12:12 PDT 2022


sammccall marked 3 inline comments as done.
sammccall added a comment.

Ugh, sorry for the sloppiness, think I was tired.



================
Comment at: clang-tools-extra/clangd/unittests/SelectionTests.cpp:469
       {"struct foo { [[^~foo()]]; };", "CXXDestructorDecl"},
-      // FIXME: The following to should be class itself instead.
       {"struct foo { [[fo^o(){}]] };", "CXXConstructorDecl"},
----------------
nridge wrote:
> The FIXME looks like it pertains to the next line where the behaviour is unchanged -- should it be preserved?
I'm pretty sure the reason for the FIXME was to consistently handle type names within constructors/destructors as referencing the type - with this patch we're (hopefully) consistent in the other direction instead.

(I think I probably wrote this comment, I wish I'd included more context)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136212



More information about the cfe-commits mailing list