[cfe-dev] Getting involved with Clang refactoring
dgregor at apple.com
Fri May 18 08:21:06 PDT 2012
On May 18, 2012, at 12:11 AM, David Wood <dswood at gmail.com> wrote:
> I just attended Chandler Carruth's talk at C++ Now about using clang to develop refactoring tools. As they say on the internets "Your ideas intrigue me and I would like to subscribe to your newsletter."
> I believe that refactoring tools can be groundbreaking for C++ and would like to contribute. I'm particularly interested in getting the tools hooked into IDEs (many years ago I worked on a refactoring plugin for JBuilder), but it sounds like there's lots of work to be done before that. How can I get started, and what most needs to be worked on?
Arnaud's links point at the tooling infrastructure, which is intended for building standalone refactoring and source-based tools.
For IDE-centric tools, libclang
is a C interface to Clang that focuses on the things that IDEs like to do: syntax highlighting, indexing, code completion, finding all of the references to a given declaration within a file, finding out what your cursor is pointing to, etc. I gave an introductory talk on libclang at the 2010 LLVM Developer Meeting which might be helpful:
If your primary interest is in IDEs, I suggest wiring up libclang to your favorite open-source IDE. There are various Vim and Emacs libclang bindings running around, for example, although I don't know which are best. Personally, I think it would be awesome if we could have easy-to-install, libclang-based packages for vim and emacs that were maintained along with Clang and got all of the new libclang goodness. Once you've played with libclang's integration, I'm sure you'll find something that needs improvement, and we can point you at that code if you don't find it yourself.
If your primary interest is in refactoring, Arnaud's links to tooling are a good place to start, because it's starting to collect the pieces needed to make refactoring easier.
More information about the cfe-dev