diff options
Diffstat (limited to 'devel/qt6-base/files/patch-src_corelib_global_qcompilerdetection.h')
-rw-r--r-- | devel/qt6-base/files/patch-src_corelib_global_qcompilerdetection.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/devel/qt6-base/files/patch-src_corelib_global_qcompilerdetection.h b/devel/qt6-base/files/patch-src_corelib_global_qcompilerdetection.h new file mode 100644 index 000000000000..6766a7584185 --- /dev/null +++ b/devel/qt6-base/files/patch-src_corelib_global_qcompilerdetection.h @@ -0,0 +1,18 @@ +Suppress warnings when -pedantic is passed and using std < c++20, which could +also be errors if -Werror is also passed as is the case with www/dooble. + +error: use of the 'nodiscard' attribute is a C++20 extension + +https://github.com/llvm/llvm-project/issues/32865 + +--- src/corelib/global/qcompilerdetection.h.orig 2024-01-22 10:20:09 UTC ++++ src/corelib/global/qcompilerdetection.h +@@ -964,7 +964,7 @@ + # define Q_REQUIRED_RESULT [[nodiscard]] + #endif + +-#if __has_cpp_attribute(nodiscard) >= 201907L /* used for both P1771 and P1301... */ ++#if __has_cpp_attribute(nodiscard) >= 201907L && (!defined(Q_CC_CLANG) || __cplusplus >= 201907L) /* used for both P1771 and P1301... */ + // [[nodiscard]] constructor (P1771) + # ifndef Q_NODISCARD_CTOR + # define Q_NODISCARD_CTOR [[nodiscard]] |