================
@@ -811,8 +811,14 @@ renameWithinFile(ParsedAST &AST, const NamedDecl 
&RenameDecl,
       continue;
     Locs.push_back(RenameLoc);
   }
-  if (const auto *MD = dyn_cast<ObjCMethodDecl>(&RenameDecl))
-    return renameObjCMethodWithinFile(AST, MD, NewName, std::move(Locs));
+  if (const auto *MD = dyn_cast<ObjCMethodDecl>(&RenameDecl)) {
+    if (MD->getSelector().getNumArgs() > 1)
----------------
kadircet wrote:

can you give some context into why?

commit message just says what the code does, not why either, so it's not 
obvious to me what's broken and how it's fixed with this change.

i can see how `zero` arg selectors don't work through the logic you have, 
because we expect `foo:` and there's never a `:`, but I don't see what's broken 
with single-arg selectors (and I guess we're having the following consume_back, 
solely to force single-arg selector case work through C++ rename?)

https://github.com/llvm/llvm-project/pull/82396
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to