commit:     6fb7d0a7131b5a5938b12673f4b260d66cc1a527
Author:     Denis Pronin <dannftk <AT> yandex <DOT> ru>
AuthorDate: Thu Jul 13 14:55:14 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug  4 12:35:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fb7d0a7

dev-qt/qtwebengine: fix compiling with clang-16

clang-16 complains about casting an integer value that exceeds an
enumeration capacity in the class base::BitField
to not modify chromium code we just cancel warning about this
circumstance to prevent it from being converted to an error that fails
compilation

[sam: Note that this is a bandaid and won't work with Clang 17.]

Bug: https://bugs.gentoo.org/903573
Signed-off-by: Denis Pronin <dannftk <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/31869
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/qtwebengine-5.15.10_p20230623-clang16.patch     | 15 +++++++++++++++
 dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild   |  5 ++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git 
a/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230623-clang16.patch 
b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230623-clang16.patch
new file mode 100644
index 000000000000..2d8f8482e1b4
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230623-clang16.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/903573
+--- a/src/3rdparty/chromium/v8/src/base/bit-field.h
++++ b/src/3rdparty/chromium/v8/src/base/bit-field.h
+@@ -39,8 +39,11 @@
+   static constexpr int kLastUsedBit = kShift + kSize - 1;
+   static constexpr U kNumValues = U{1} << kSize;
+ 
++  #pragma clang diagnostic push
++  #pragma clang diagnostic ignored "-Wenum-constexpr-conversion"
+   // Value for the field with all bits set.
+   static constexpr T kMax = static_cast<T>(kNumValues - 1);
++  #pragma clang diagnostic pop
+ 
+   template <class T2, int size2>
+   using Next = BitField<T2, kShift + kSize, size2, U>;

diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild 
b/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild
index ce07a4c85372..937b8d59b20d 100644
--- a/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230623.ebuild
@@ -100,7 +100,10 @@ BDEPEND="${PYTHON_DEPS}
        ppc64? ( >=dev-util/gn-0.1807 )
 "
 
-PATCHES=( "${WORKDIR}/${PN}-5.15.8_p20230313-patchset" )
+PATCHES=(
+       "${WORKDIR}/${PN}-5.15.8_p20230313-patchset"
+       "${FILESDIR}/${PN}-5.15.10_p20230623-clang16.patch"
+)
 
 qtwebengine_check-reqs() {
        # bug #307861

Reply via email to