From 251a0869be413f83ca1069aa2556bc714343a7b0 Mon Sep 17 00:00:00 2001 From: Michael Winterberg Date: Fri, 1 Jan 2016 18:07:06 -0800 Subject: [PATCH] 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. --- format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format.h b/format.h index 42bb0379..345877a7 100644 --- a/format.h +++ b/format.h @@ -75,7 +75,7 @@ typedef __int64 intmax_t; # define FMT_API #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) # include // _BitScanReverse, _BitScanReverse64 namespace fmt {