Fixed macro redefinition warnings when compiling with clang-cl.

Both clang-cl and Clang/C2 #define _MSC_VER but also have support for __builtin_clz and __builtin_clzll, leading to duplicate macro definition warnings. This change suppresses emulation of clz using _BitScanReverse if the __clang__ macro is defined.
This commit is contained in:
Michael Winterberg
2016-01-01 18:07:06 -08:00
parent 804ad8f4df
commit 251a0869be

View File

@@ -75,7 +75,7 @@ typedef __int64 intmax_t;
# define FMT_API
#endif
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
# include <intrin.h> // _BitScanReverse, _BitScanReverse64
namespace fmt {