[PATCH] D21814: clang-rename: split existing options into two new subcommands

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 00:47:10 PDT 2016


klimek added a comment.

Kirill, unless you have *specific* issues with this patch, I think it's good to land.


================
Comment at: clang-rename/RenamingAction.cpp:48
@@ +47,3 @@
+    for (unsigned I = 0; I < NewNameList.size(); ++I) {
+      HandleOneRename(Context, NewNameList[I], PrevNameList[I], USRList[I]);
+    }
----------------
vmiklos wrote:
> klimek wrote:
> > Question is whether if we go down that route we shouldn't do one search for all the names, instead of re-looping for each name.
> You mean improving USRLocFindingASTVisitor, so that it can work with a list of USRs, not with just a single USR? I can do that, but if possible, I would like to do that as a follow-up patch; it was called in a loop already before this patch, so sounds orthogonal. (And it would potentially conflict with any pending patches that touch that class.)
> 
> I could fold HandleOneRename() into HandleTranslationUnit(), but that just makes the resulting function larger, and does not get rid of the looping. Or is that what you want?
No, the former. Can you add a FIXME?


https://reviews.llvm.org/D21814





More information about the cfe-commits mailing list