I installed LLVM for Windows, which includes Clang and a few other tools. It integrates with Visual Studio, and even lets me choose a "Platform Toolset" in the project properties. However, when I choose any of the toolsets that came with LLVM, __clang__ isn't defined, and _MSC_VER is defined instead. How do I make __clang__ defined when using LLVM and Clang in Visual Studio?
My Visual Studio version is the 2015 Preview (however I have also tested on 2013 with no success either), and my LLVM version is based off of SVN release 225473. I've tried LLVM-vs2012, LLVM-vs2013, and LLVM-vs2014 as the Platform Toolset without success.
__llvm__. Clang is a GCC replacement, which an MSVC toolset isn't.__clang__is also defined, at least it was last time I have tested it. Make sure you are checking__clang__before_MSC_VER.__clang__nor__llvm__are defined when using the Platform Toolset in Visual Studio. I got the toolset from llvm.org/builds