[cfe-dev] Using Clang to Expand Macros

Konstantin Tokarev annulen at yandex.ru
Thu Nov 22 07:55:49 PST 2012


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



More information about the cfe-dev mailing list