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

Nico Weber thakis at chromium.org
Wed Jul 30 09:37:51 PDT 2014


On Tue, Jul 29, 2014 at 10:18 PM, Daniel Albuschat <d.albuschat at gmail.com>
wrote:

> Hi there,
>
> 2014-07-25 22:01 GMT+02:00 Amin Shali <amshali at google.com>:
>
>  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.).
>>
>
> This is something that C++ developers are definitely lacking. Just image
> how neat it could be to rename some legacy class or method name in the LLVM
> or clang codebase that has been bugging you ever since. :-) If it can be
> used broadly, it could become a "game changer" in C/Objective C/C++ code
> quality, e.g. for large frameworks like Qt, KDE, the Linux kernel.
>
> I have one question that might be important to others that are interested,
> too:
> Will this only work on a codebase that can be compiled (or at least
> strictly parsed) with clang, or is it more "fuzzy", so it will work with
> e.g. a codebase that uses windows.h (that, afaik, can not be compiled with
> clang - please correct me if I'm wrong)?
>

clang can parse windows.h, see
http://clang.llvm.org/docs/MSVCCompatibility.html


> This might be a general LibTooling-question, though.
>
> Greetings,
>
> Daniel Albuschat
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140730/b5d84c7d/attachment.html>


More information about the cfe-dev mailing list