[cfe-dev] Integrating clang-based refactoring tools into IDEs - best practices?

Manuel Klimek klimek at google.com
Mon Jun 1 13:12:33 PDT 2015

On Mon, Jun 1, 2015 at 8:07 PM Richard <legalize at xmission.com> wrote:

> In article <CAOsfVvnRwj36LrGnCRv4y7hi9S+ioEzyJNxaEc=
> aM-WmLNDrHA at mail.gmail.com>,
>     Manuel Klimek <klimek at google.com> writes:
> > On Mon, Jun 1, 2015 at 6:27 PM Richard <legalize at xmission.com> wrote:
> > > Every time I've asked about where to put refactoring tools, I'm always
> > > told "clang-tidy",
> >
> >
> > I'd fine that very curious... (when I say refactoring I usually mean
> > "Fowler-style")
> Ah, so you're thinking of very general refactorings like Extract
> Method, Inline Method, etc.  Over the years I've written up some
> refactorings in Fowler style that are specific to C/C++:
> <https://legalizeadulthood.wordpress.com/category/refactoring/>
> The refactorings I've been doing in clang-tidy are maybe what you
> would call "micro refactorings":
> if (b == true) => if (b)
> ...and yet, these sorts of things are *very* useful from an IDE.  Yes,
> you can run clang-tidy and mark these as "fixups" that are available
> by applying the suggested patch from clang-tidy, but both the micro
> refactorings and the Fowler style ones seem like they'd be better off
> in a library that was invoked in a shorter turnaround cycle from an
> IDE.  Do you agree?
> clang-tidy is batch oriented.  IDEs are interactive.

I think that's not true in general. clang-tidy, the command line tool, in
its current form is batch oriented. I don't think there's a generic
limitation to integrate clang-tidy into IDEs (we integrate it into our code
review tool for example).

> --
> "The Direct3D Graphics Pipeline" free book <
> http://tinyurl.com/d3d-pipeline>
>      The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
>          The Terminals Wiki <http://terminals.classiccmp.org>
>   Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
> PS: Mail filters are blocking my messages, so ignore this, its
> only for them.  Lorem ipsum dolor sit amet, consectetur adipiscing
> elit. Phasellus consequat ullamcorper mollis. Sed blandit semper tortor
> ultricies dictum. Proin hendrerit et quam in sagittis. Maecenas vel
> blandit ante, in auctor sem.  Phasellus condimentum leo vel finibus
> viverra. Duis fermentum sollicitudin est, ac iaculis lectus auctor vel.
> Nam condimentum nulla feugiat, venenatis nibh a, elementum nulla. Nulla
> vitae malesuada eros. Nulla cursus maximus ligula non hendrerit.
> Curabitur lobortis nulla vel sapien posuere, id aliquam orci
> bibendum. Vestibulum at vulputate risus. Proin in purus commodo,
> tempus lectus vitae, faucibus nunc. Aenean congue faucibus elit, sit
> amet facilisis nibh ultrices eget. Nam pulvinar leo ac nunc ultricies,
> nec tincidunt nulla tincidunt. Etiam placerat felis tellus, ut ultricies
> nunc ultricies quis. In placerat sapien nec ultricies mattis. Integer
> sed tempor orci, ac imperdiet orci. Integer ac augue et augue convallis
> faucibus.
> _______________________________________________
> 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/20150601/7df0afd6/attachment.html>

More information about the cfe-dev mailing list