[cfe-dev] RFC: Adding a rename refactoring tool to clang

Tobias Grosser tobias at grosser.es
Sat Jul 26 00:26:02 PDT 2014


On 25/07/2014 22:01, Amin Shali wrote:
> Folks,
>
> At Google we are working on a tool and set of APIs for refactoring C++
> programs based on LibTooling. Particularly, we have targeted rename
> refactoring for C++ as our first step.
>
> In our first iteration we want to offer two things:
> 1- A command line tool similar to clang-format which will semantically
> rename a symbol (specified by a position in a file) in a set of input files.
> 2- An API for doing the above task which can effectively be used to provide
> this functionality for any editor (Emacs, Vim, CodeMirror, etc.).

Hi Amin,

this is interesting.

Do you plan to keep parsed files in memory/a cache/indexed? If you e.g. 
want to rename a couple of constructs in the LLVM code base, it seems to 
make a big difference if you need to wait 5-10 minutes until a rename 
has taken place or if it is almost instant, especially for editor 
integration.

I am asking this as performing actions/analysis across multiple 
translation units is a recurring problem and it would be interesting to 
see if/how your work would (maybe not today?) integrate with such kind 
of service.

Cheers,
Tobias




More information about the cfe-dev mailing list