[PATCH] D71247: [clangd] Rename constructors and destructors in cross-file case

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 12 01:30:31 PST 2019


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:91
+                  DeclRelation::Alias | DeclRelation::TemplatePattern)) {
+    // If the cursor is at the underlying CXXRecordDecl of the
+    // ClassTemplateDecl, ND will be the CXXRecordDecl. In this case, we need to
----------------
sammccall wrote:
> why is this code being moved?
So, this code was previously only in the within-file rename path and hence triggering rename from a constructor/destructor-s was only possible there. Moving the code here improves overall "symbol selection" and fixes it for global renames, too.


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

https://reviews.llvm.org/D71247





More information about the cfe-commits mailing list