[cfe-dev] Apple's Clang
Alexander Smirnov
alexander at smirn0v.ru
Mon May 21 13:45:03 PDT 2012
Daniel,
Thanks for fast reply!
As far as I understand the tricky part here is that if I want to build a plugin I need a set of static libraries (clangFrontend, clangDriver, clangAST, etc.), but Apple's Clang version does not include them.
I have already managed to build a pair of plugins with my own build of Clang, but don't understand how to achieve the same with Apple's Clang version.
--
Alexander Smirnov
On Tuesday, May 22, 2012 at 12:22 AM, Daniel Powell wrote:
> Hey
>
> > Does anyone have experience building clang plugins for Apple's version of Clang ? Is it possible ?
>
> Yep, two ways of doing things: Writing a plugin, or using libclang.
>
> For creating plugins check out:
> http://code.google.com/p/chromium/wiki/WritingClangPlugins
> and
> http://getoffmylawnentertainment.com/blog/2011/10/01/clang-plugin-development-tutorial/
>
> Or for linking in with libclang check out:
> https://github.com/loarabia/Clang-tutorial
>
> Also there's the Clang Doxygen documentation which, along with the source code, is incredibly useful:
> http://clang.llvm.org/doxygen/
>
> > What I'm trying to do is to create simple Obj-C code style guidelines checker.
> >
>
>
> If you're wanting to traverse the AST I recommend you look into creating a plugin with a custom ASTConsumer and RecursiveASTVisitor.
>
> Cheers,
>
> Dan
>
>
> --
> --------
> Daniel Powell
> d.c.powell at sms.ed.ac.uk (mailto:d.c.powell at sms.ed.ac.uk)
> http://tinyurl.com/powelld
>
> The University of Edinburgh
> Institute for Computer Systems Architecture
>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120522/3b98f03f/attachment.html>
More information about the cfe-dev
mailing list