[cfe-dev] Clang as a scripted refactoring tool

Fariborz Jahanian fjahanian at apple.com
Wed Sep 1 11:17:59 PDT 2010


On Aug 31, 2010, at 10:09 AM, Sebastian Redl wrote:

>
> On Aug 31, 2010, at 9:56 AM, Joseph Garvin wrote:
>> I asked the mozilla guys about this
>> on IRC and they suggested Clang is already part way there. What's the
>> state of using Clang for refactoring and what parts of the code base
>> should I be looking at if I'm interested in trying to build something
>> like this?
>
> Hi,
>
> Clang is designed to be usable as the basis for a refactoring tool.  
> Your best bet is to look at the Rewriter component. It allows you to  
> create edits of the source code, based on location information  
> stored in the AST. For an example, look at the Obj-C rewriter, a  
> tool that rewrites Obj-C into pure C.
Minor note. It rewrites into C++.

- Fariborz

>
>
> Sebastian
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list