[cfe-dev] Using Clang to Expand Macros

Peter Conn conn.peter at gmail.com
Thu Nov 22 07:58:04 PST 2012


Ah, I'm sorry, I was thinking a bit too in-depth to give all the details I
should have - I had meant from in C++ (so using
http://clang.llvm.org/doxygen/group__CINDEX.html ).

Thanks, Peter


On 22 November 2012 15:55, Konstantin Tokarev <annulen at yandex.ru> wrote:

>
> 22.11.2012, 19:29, "Peter Conn" <conn.peter at gmail.com>:
> > HeyaHow do I use clang to expand macros?
> > I've been able to find the CXCursor enums to do with it, but I've not
> been able to find anything more.
> > Ideally this would be some sort of operation on a Translation Unit.
> > Thanks,
> > Peter
>
> You can expand macros in whole translation unit by calling clang -E on
> source file.
>
> --
> Regards,
> Konstantin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121122/ab7c2713/attachment.html>


More information about the cfe-dev mailing list