--- src/corelib/tools/qsimd_p.h.orig 2016-12-01 01:17:04.000000000 -0700
+++ src/corelib/tools/qsimd_p.h 2019-10-17 08:18:10.000000000 -0700
#define qCpuHasFeature(feature) ((qCompilerCpuFeatures & (Q_UINT64_C(1) << CpuFeature ## feature)) \
|| (qCpuFeatures() & (Q_UINT64_C(1) << CpuFeature ## feature)))
-#if QT_HAS_BUILTIN(__builtin_clz) && QT_HAS_BUILTIN(__builtin_ctz) && defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+#if QT_HAS_BUILTIN(__builtin_clz) && QT_HAS_BUILTIN(__builtin_ctz) && (defined(Q_CC_CLANG) && Q_CC_CLANG < 900) && !defined(Q_CC_INTEL)
static Q_ALWAYS_INLINE unsigned _bit_scan_reverse(unsigned val)
Q_ASSERT(val != 0); // if val==0, the result is undefined.
_BitScanForward(&result, val);
-# elif (defined(Q_CC_CLANG) || (defined(Q_CC_GNU) && Q_CC_GNU < 405)) \
+# elif ((defined(Q_CC_CLANG) && Q_CC_CLANG < 900) || (!defined(Q_CC_CLANG) && defined(Q_CC_GNU) && Q_CC_GNU < 405)) \
// Clang is missing the intrinsic for _bit_scan_reverse
// GCC only added it in version 4.5