================
@@ -811,8 +811,17 @@ 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)) {
+ // The custom ObjC selector logic doesn't handle the zero arg selector
+ // case. We could use it for the one arg selector case but it's simpler to
+ // use the standard one-token rename logic.
----------------
kadircet wrote:
```suggestion
// The custom ObjC selector logic doesn't handle the zero arg selector
// case, as it relies on parsing selectors via the trailing `:`.
// We also chose to use regular rename logic for the single-arg selectors
// as AST/Index has the right locations in that case.
```
https://github.com/llvm/llvm-project/pull/82396
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits