[cfe-dev] Source to source transformations questions in branches/tooling
klimek at google.com
Mon Jun 25 02:57:30 PDT 2012
On Mon, Jun 25, 2012 at 11:51 AM, Stephen Kelly <steveire at gmail.com> wrote:
> Philip Dunstan wrote:
> > Hi,
> > I've been trying some source to source transformations using the
> > matcher/callback framework in the tooling branch. They are mostly working
> > but I have a couple of questions and would like some feedback on whether
> > am doing everything as intended. Will you please help me?
> Hi Philip,
> I'm in the same position as you, having used the tooling API and had some
> I also just published a follow up blog post:
> > There are two transformations I am trying to make: adding the override
> > keyword to virtual functions where we can and replacing shared_ptr by
> > value function parameters with const references. I have attached the two
> > cpp files to this post. They are also available from
> > https://bitbucket.org/phildunstan/clang_tools/src/5d63a291d377/add-
> > https://bitbucket.org/phildunstan/clang_tools/src/5d63a291d377/replace-
> At least the override one seems to be generally useful. It's starting to
> look more likely that a repo for things like this (and some of the generic
> parts of my work such as method renaming) should be in a shared location in
> the clang tree (possibly just in an example).
Yep. Perfect for the examples section, methinks.
> > I'd like to run these tools over our complete code base where the changes
> > will affect both header and source files. What is the recommended way to
> > limit changes to only my files and not system header files? I expect I
> > limit them to the main file specified by the source manager, however I
> > assume that this would prevent changes to my header files.
> The approach I took was to specify the top of the source tree manually as a
> command line argument and then try to verify that I only change files in
> correct paths.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev