Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-15 Thread Miklos Vajna via cfe-commits
vmiklos updated this revision to Diff 64204. https://reviews.llvm.org/D21814 Files: clang-rename/tool/ClangRename.cpp test/clang-rename/ClassFindByName.cpp test/clang-rename/ClassReplacements.cpp test/clang-rename/ClassSimpleRenaming.cpp test/clang-rename/ClassTest.cpp test/clang-rena

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-15 Thread Miklos Vajna via cfe-commits
vmiklos added a comment. I'm a bit confused. On one hand, I want to use tooling::CommonOptionsParser to parse the options, which needs a cl::OptionCategory as a parameter. On the other hand, I want to parse the options, based on that I'll know what subcommand was requested, and then I can choo

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-15 Thread Manuel Klimek via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D21814#485410, @vmiklos wrote: > The alternative is to change the `CommonOptionsParser` ctor to take a vector > of `OptionCategory&`, and in that case we can add the -extra-arg-before and > other options to all subcommands, but that means he'l

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-15 Thread Miklos Vajna via cfe-commits
vmiklos added a comment. The alternative is to change the `CommonOptionsParser` ctor to take a vector of `OptionCategory&`, and in that case we can add the -extra-arg-before and other options to all subcommands, but that means he'll have to adapt all client code, i.e. all tools in clang-tools-e

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-15 Thread Manuel Klimek via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D21814#478879, @vmiklos wrote: > As far as I see `tooling::CommonOptionsParser` (in its current form) does not > handle cl::SubCommand instances. Should I fix that or would it be OK to > switch to using `cl::ParseCommandLineOptions` directly i

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-08 Thread Miklos Vajna via cfe-commits
vmiklos added a comment. As far as I see `tooling::CommonOptionsParser` (in its current form) does not handle cl::SubCommand instances. Should I fix that or would it be OK to switch to using `cl::ParseCommandLineOptions` directly in clang-rename? http://reviews.llvm.org/D21814 _

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. Manuel, > I think it's important to note that Miklos is probably a user, otherwise I'd > guess he wouldn't add those features. Sure. But there are different kinds of users :) IIRC there's a discussion in cfe-def called "Clang should natively support Fortran" or someth

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Manuel Klimek via cfe-commits
klimek added a comment. Kirill, I think it's important to note that Miklos is probably a user, otherwise I'd guess he wouldn't add those features. Generally, we also internally have a (large scale) simplified rename tool that allows renaming multiple things in a code base at once; it is definite

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. Miklos, thanks for the feedback! Hm, I'm not sure about a) and b) camps here. I think we can have both. It may be that I haven't looked too much into the code or I am missing something, but so far both integration and cross-TU analysis seem OK together in one tool as f

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Miklos Vajna via cfe-commits
vmiklos added a comment. Kirill: OK, so you're in the camp marked as b) by Manuel. Sure, the vim integration is nice (I'm also a vim user), now that you mentioned it, I need to go and try it myself. ;-) Given the above patch, probably it's obvious that I'm more in camp a). I don't insist on hav

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a subscriber: omtcyf0. omtcyf0 added a comment. Hi @vmiklos! Thank you very much for contributing to clang-rename. The patch looks nice, but it conflicts with my understanding of the view on what the tool should do. Generally, I do not support the idea of adding an option to perf

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Manuel Klimek via cfe-commits
klimek added a comment. In http://reviews.llvm.org/D21814#476572, @bkramer wrote: > In http://reviews.llvm.org/D21814#475322, @klimek wrote: > > > I think we really want 2 tools: > > a) one that is optimized for oldname->newname renames, and supports the > > multi-TU case really well > > b) on

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. In http://reviews.llvm.org/D21814#475322, @klimek wrote: > I think we really want 2 tools: > a) one that is optimized for oldname->newname renames, and supports the > multi-TU case really well > b) one that is meant to be integrated with editors and works mainly off of

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-06 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: bkramer. klimek added a comment. I think we really want 2 tools: a) one that is optimized for oldname->newname renames, and supports the multi-TU case really well b) one that is meant to be integrated with editors and works mainly off of a location in a file I'm a bit t

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-05 Thread Miklos Vajna via cfe-commits
vmiklos added a comment. Manuel, do you have an opinion on this, please? http://reviews.llvm.org/D21814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-06-28 Thread Miklos Vajna via cfe-commits
vmiklos created this revision. vmiklos added a reviewer: klimek. vmiklos added a subscriber: cfe-commits. This way parsing the source input multiple times for multiple renames can be avoided. http://reviews.llvm.org/D21814 Files: clang-rename/RenamingAction.cpp clang-rename/RenamingAction.h