[PATCH] D150685: [clangd] Renaming: Treat member functions like other functions
Christian Kandeler via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 08:58:49 PDT 2023
ckandeler created this revision.
ckandeler added a reviewer: hokein.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
ckandeler requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
... by skipping the conflict check. The same considerations apply.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150685
Files:
clang-tools-extra/clangd/refactor/Rename.cpp
Index: clang-tools-extra/clangd/refactor/Rename.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/Rename.cpp
+++ clang-tools-extra/clangd/refactor/Rename.cpp
@@ -515,7 +515,8 @@
else {
// Name conflict detection.
// Function conflicts are subtle (overloading), so ignore them.
- if (RenameDecl.getKind() != Decl::Function) {
+ if (RenameDecl.getKind() != Decl::Function &&
+ RenameDecl.getKind() != Decl::CXXMethod) {
if (auto *Conflict = lookupSiblingWithName(ASTCtx, RenameDecl, NewName))
Result = InvalidName{
InvalidName::Conflict,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150685.522649.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230516/0d07475f/attachment.bin>
More information about the cfe-commits
mailing list