File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -287,12 +287,16 @@ typedef __int64 intmax_t;
287
287
# define FMT_ASSERT (condition, message ) assert((condition) && message)
288
288
#endif
289
289
290
- #if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz)
291
- # define FMT_BUILTIN_CLZ (n ) __builtin_clz(n)
292
- #endif
290
+ // __builtin_clz is broken in clang with Microsoft CodeGen:
291
+ // https://github.com/fmtlib/fmt/issues/519
292
+ #ifndef _MSC_VER
293
+ # if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz)
294
+ # define FMT_BUILTIN_CLZ (n ) __builtin_clz(n)
295
+ # endif
293
296
294
- #if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clzll)
295
- # define FMT_BUILTIN_CLZLL (n ) __builtin_clzll(n)
297
+ # if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clzll)
298
+ # define FMT_BUILTIN_CLZLL (n ) __builtin_clzll(n)
299
+ # endif
296
300
#endif
297
301
298
302
// Some compilers masquerade as both MSVC and GCC-likes or
You can’t perform that action at this time.
0 commit comments