[cfe-dev] Using Clang for a C Refactoring Tool

pingu219 at gmail.com pingu219 at gmail.com
Fri Apr 11 03:17:20 PDT 2008


Same here! If only to see how easy/hard it is to build a refactoring
tool using Clang.

On 4/11/08, Chris Lattner <clattner at apple.com> wrote:
>
>
> On Apr 10, 2008, at 5:59 PM, Patrick Flannery wrote:
>
>
> >Additionally, I  suspect we'd welcome code to do more in this area into the
> tree.  I
> >think clang would be a good place to do this.
> >Also, because clang (and llvm) is built and designed as a set of
> >useful libraries for solving all sorts of problem, if there is a rough
> >area where the design could be improved to meet your specific needs, I
> >think we are interested in have that flexibility in clang.
>
>
>
> Refactoring is my goal as well.  I was originally attracted to clang because
> its design yields a much more expressive tree structure with detailed source
> locations, this makes refactoring easy in many situations.  I had a brief
> list of refactorings that I had worked on, for example renaming functions
> and variables, moving sections of code to different files and listing
> #include's which are not required in a given translation unit.  If there was
> some community interest in this, I would very much like to contribute my
> work.  One area which I have not spent enough time thinking about is what an
> interface for refactoring should look like.  If people had some suggestions
> regarding what they would like to see and how the respective pieces should
> interact I would appreciate it.
>
> This is very interesting, I'd love to see what you've been working on!
>
> -Chris



More information about the cfe-dev mailing list