[PATCH] D133415: [clangd] Fix non-idempotent cases of canonicalRenameDecl()

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 04:53:35 PDT 2022


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM to unbreak clangd. Agree that a more thorough look at this is needed.
Maybe add a bug to track this?



================
Comment at: clang-tools-extra/clangd/unittests/RenameTests.cpp:1521
           R"cpp(
         template <typename> class Foo { virtual void [[m]](); };
         class Bar : Foo<int> { void [[^m]]() override; };
----------------
Quick question to help better understand our current behavior. Not requesting to change anything here, just wanted to make sure what we're doing now.

If we run the rename inside the primary template itself, are we going to rename the use in `Bar`?
I suspect the answer is "yes" because it's in the same file, so we get it from the AST and not from the index. Just to make sure.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133415



More information about the cfe-commits mailing list