diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index d7d5699591..949617fa7c 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -581,7 +581,7 @@ # define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNOF # endif -# if 0 /* not implemented in clang yet */ +# if __has_feature(cxx_atomic) && __has_include() # define Q_COMPILER_ATOMICS # endif # if __has_feature(cxx_attributes) @@ -880,6 +880,8 @@ # undef Q_COMPILER_INITIALIZER_LISTS # undef Q_COMPILER_RVALUE_REFS # undef Q_COMPILER_REF_QUALIFIERS +// Also disable , since it's clearly not there +# undef Q_COMPILER_ATOMICS # endif # if defined(_LIBCPP_VERSION) // libc++ uses __has_feature(cxx_atomic), so disable the feature if the compiler