What predefined macro can I use to detect clang ?

Posted by Pierre Bourdon on Stack Overflow See other posts from Stack Overflow or by Pierre Bourdon
Published on 2010-04-17T13:12:57Z Indexed on 2010/04/17 13:23 UTC
Read the original article Hit count: 664

Filed under:
|
|
|

I'm trying to detect the compiler used to compile my source code. I can easily find predefined macros to check for MSVC or GCC (see http://predef.sourceforge.net/ for example), but I cannot find any macro to check for clang.

Does someone know if clang defines a macro like __CLANG__ in order to know what is currently compiling my code ?

© Stack Overflow or respective owner

Related posts about c

    Related posts about clang