[cfe-dev] advice with development on clang-tidy matchers

Jonathan Coe jbcoe at me.com
Tue Feb 17 06:26:27 PST 2015


I'm finding it very hard to find information and examples on using the
matchers and API to do a number of things. I wondered if anyone knew of a
good source of introductory info that goes into some depth? Eli Bendersky's
blogs are very good but I need more detail on specific things: I'm keen to
use matchers to match standard library types by name but that seems hard.

I have work in progress here:


   -
   https://github.com/jbcoe/clang-tools-extra/blob/missing_namespace_std/clang-tidy/misc/MissingNamespaceStdCheck.cpp

   -
   https://github.com/jbcoe/clang-tools-extra/blob/propagate_const/clang-tidy/misc/PropagateConstCheck.cpp


I'm stuck on both:


   - MissingNameSpaceStd can't cope with pointers, references or template
   types like std::vector<std::pair<int,int>>

   - PropagateConst can't match smart pointers. Ideally it would do so by
   duck-typing but I'd settle for name matching for now.


I've posted messages on the clang IRC channel but am met by stony silence.
I've not used IRC before so perhaps my setup is wrong.


I set up a review account on http://llvm.org/docs/Phabricator.html and have
patches for the git repositories above but need a repository name for
Differential (clang, clang-tools-extra, llvm are not right) to make
progress.

Thanks for any help you may be able to offer.

regards,

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150217/ca465a12/attachment.html>


More information about the cfe-dev mailing list