diff --git a/src/corelib/global/qcompare.h b/src/corelib/global/qcompare.h index 7b937a9e716..c0ca4be00ea 100644 --- a/src/corelib/global/qcompare.h +++ b/src/corelib/global/qcompare.h @@ -232,6 +232,7 @@ private: QT_WARNING_PUSH // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100903 QT_WARNING_DISABLE_GCC("-Wzero-as-null-pointer-constant") + QT_WARNING_DISABLE_CLANG("-Wzero-as-null-pointer-constant") friend constexpr bool is_eq (partial_ordering o) noexcept { return o == 0; } friend constexpr bool is_neq (partial_ordering o) noexcept { return o != 0; } friend constexpr bool is_lt (partial_ordering o) noexcept { return o < 0; } @@ -417,6 +418,7 @@ private: QT_WARNING_PUSH // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100903 QT_WARNING_DISABLE_GCC("-Wzero-as-null-pointer-constant") + QT_WARNING_DISABLE_CLANG("-Wzero-as-null-pointer-constant") friend constexpr bool is_eq (weak_ordering o) noexcept { return o == 0; } friend constexpr bool is_neq (weak_ordering o) noexcept { return o != 0; } friend constexpr bool is_lt (weak_ordering o) noexcept { return o < 0; } @@ -612,6 +614,7 @@ public: QT_WARNING_PUSH // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100903 QT_WARNING_DISABLE_GCC("-Wzero-as-null-pointer-constant") + QT_WARNING_DISABLE_CLANG("-Wzero-as-null-pointer-constant") friend constexpr bool is_eq (strong_ordering o) noexcept { return o == 0; } friend constexpr bool is_neq (strong_ordering o) noexcept { return o != 0; } friend constexpr bool is_lt (strong_ordering o) noexcept { return o < 0; } @@ -862,6 +865,7 @@ private: QT_WARNING_PUSH // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100903 QT_WARNING_DISABLE_GCC("-Wzero-as-null-pointer-constant") + QT_WARNING_DISABLE_CLANG("-Wzero-as-null-pointer-constant") friend constexpr bool is_eq (QPartialOrdering o) noexcept { return o == 0; } friend constexpr bool is_neq (QPartialOrdering o) noexcept { return o != 0; } friend constexpr bool is_lt (QPartialOrdering o) noexcept { return o < 0; }