[cfe-dev] clang-tidy in the editor

Kevin Funk via cfe-dev cfe-dev at lists.llvm.org
Wed Dec 23 01:13:09 PST 2015


On Thursday, December 17, 2015 09:37:22 AM Mark Deggeller via cfe-dev wrote:
> Glad to hear it.
> 
> I have managed to integrate clang-tidy as a plugin in libclang. I
> haven't exposed the entire command-line options, but it is working for
> my purposes.

That's awesome!

Can you share the extra plumbing needed in order to load clang-tidy as a 
plugin?

For loading the Clang plugin in libclang I presume you also needed a similar 
patch like http://reviews.llvm.org/D15729, right? Care to help out reviewing + 
assuring this makes it into Clang proper?

Thanks,
Kevin
 
> How are you planning on integrating the two?
> 
> Thanks,
> Mark
> 
> Manuel Klimek wrote:
> > Exposing clang-tidy via libclang (or similar) to be able to integrate it
> > into editors is on our list of things to do in the first months of 2016.
> > 
> > On Thu, Dec 17, 2015 at 7:24 AM don hinton via cfe-dev
> > 
> > <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
> >     Have you tried using the -header-filter option?
> >     
> >     On Dec 8, 2015 12:57 AM, "Mark Deggeller via cfe-dev"
> >     
> >     <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
> >         I have integrated clang-tidy into a text-editor project,
> >         re-running clang-tidy as the user types. It works, but it can be
> >         slow to reparse the entire file and #includes after every edit.
> >         
> >         I've also experimented using libclang's precompiled preambles
> >         and clang_reparseTranslationUnit(). This works great for reparse
> >         performance, but I'm having trouble figuring out how to
> >         incorporate the clang-tidy checkers.
> >         
> >         I would appreciate any advice on speeding up clang-tidy so that
> >         repeatedly reparsing a file doesn't need to reparse all the
> >         #included headers.
> >         
> >         Thanks!
> >         _______________________________________________
> >         cfe-dev mailing list
> >         cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
> >         http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> >     
> >     _______________________________________________
> >     cfe-dev mailing list
> >     cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
> >     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151223/2d9cd7f9/attachment.sig>


More information about the cfe-dev mailing list