1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

devel/qt6-base: Fix warnings with LLVM 19

Pushing and popping the pragma within the qcomparehelpers macros doesn't
seem to be working anymore with LLVM 19. Unwrap the pragma until a
better solution can be found.

This should get www/dooble building again on CURRENT and suppress many
useless warnings in other ports.

MFH:		2024Q4
This commit is contained in:
Jason E. Hale 2024-12-05 04:10:36 -05:00
parent 11bd02b7ee
commit bfa2bdb1bb
2 changed files with 4 additions and 26 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= base
DISTVERSION= ${QT6_VERSION}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel
PKGNAMEPREFIX= qt6-

View File

@ -7,43 +7,21 @@ qcompare.h that upstream suppresses for GCC.
/usr/local/include/qt6/QtCore/qcomparehelpers.h:211:43: note: expanded from macro 'QT_DECLARE_ORDERING_HELPER_TEMPLATE'
211 | { return compareThreeWay(lhs, rhs) >= 0; }
--- src/corelib/global/qcomparehelpers.h.orig 2024-01-22 10:20:09 UTC
--- src/corelib/global/qcomparehelpers.h.orig 2024-09-16 09:24:52 UTC
+++ src/corelib/global/qcomparehelpers.h
@@ -197,6 +197,8 @@ template <typename In> constexpr auto to_Qt(In in) noe
@@ -197,6 +197,7 @@ template <typename In> constexpr auto to_Qt(In in) noe
{ return !comparesEqual(rhs, lhs); }
#define QT_DECLARE_ORDERING_HELPER_TEMPLATE(OrderingType, LeftType, RightType, Constexpr) \
+ QT_WARNING_PUSH \
+ QT_WARNING_DISABLE_CLANG("-Wzero-as-null-pointer-constant") \
friend Constexpr bool operator<(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(compareThreeWay(lhs, rhs))) \
{ return compareThreeWay(lhs, rhs) < 0; } \
@@ -208,7 +210,8 @@ template <typename In> constexpr auto to_Qt(In in) noe
{ return compareThreeWay(lhs, rhs) <= 0; } \
friend Constexpr bool operator>=(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(compareThreeWay(lhs, rhs))) \
- { return compareThreeWay(lhs, rhs) >= 0; }
+ { return compareThreeWay(lhs, rhs) >= 0; } \
+ QT_WARNING_POP
#define QT_DECLARE_ORDERING_HELPER_PARTIAL(LeftType, RightType, Constexpr) \
QT_DECLARE_ORDERING_HELPER_TEMPLATE(Qt::partial_ordering, LeftType, RightType, Constexpr)
@@ -225,6 +228,8 @@ template <typename In> constexpr auto to_Qt(In in) noe
@@ -225,6 +226,7 @@ template <typename In> constexpr auto to_Qt(In in) noe
// Helpers for reversed ordering, using the existing compareThreeWay() function.
#define QT_DECLARE_REVERSED_ORDERING_HELPER_TEMPLATE(OrderingType, LeftType, RightType, Constexpr) \
+ QT_WARNING_PUSH \
+ QT_WARNING_DISABLE_CLANG("-Wzero-as-null-pointer-constant") \
friend Constexpr bool operator<(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(compareThreeWay(rhs, lhs))) \
{ return compareThreeWay(rhs, lhs) > 0; } \
@@ -236,7 +241,8 @@ template <typename In> constexpr auto to_Qt(In in) noe
{ return compareThreeWay(rhs, lhs) >= 0; } \
friend Constexpr bool operator>=(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(compareThreeWay(rhs, lhs))) \
- { return compareThreeWay(rhs, lhs) <= 0; }
+ { return compareThreeWay(rhs, lhs) <= 0; } \
+ QT_WARNING_POP
#define QT_DECLARE_REVERSED_ORDERING_HELPER_PARTIAL(LeftType, RightType, Constexpr) \
QT_DECLARE_REVERSED_ORDERING_HELPER_TEMPLATE(Qt::partial_ordering, LeftType, RightType, Constexpr)