diff --git a/src/corelib/global/qcompare.h b/src/corelib/global/qcompare.h index 7fbf9aabcb..0966cdfe9e 100644 --- a/src/corelib/global/qcompare.h +++ b/src/corelib/global/qcompare.h @@ -223,6 +223,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; } @@ -408,6 +409,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; } @@ -603,6 +605,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; } @@ -852,6 +855,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; }