Skip to content

Commit 1f78da8

Browse files
marcmutzQt Cherry-pick Bot
authored andcommitted
Suppress Clang 21 -Wcharacter-conversion
The new Clang 21 warning is wreaking havoc in C++ projects that want to use modern C++, because it not only warns about char8_t → char16_t, but also about the completely harmless char16_t → char32_t conversions. It has since been fixed, but suppress the warning globally until we know which version has the fix (looks to be 21.1.4 at this point). Upstream bug report: llvm/llvm-project#163719 More discussion in: llvm/llvm-project#138526 Upstream fix: llvm/llvm-project#163927 Pick-to: 6.8 6.5 Change-Id: I6409f6f6833131e3a77d81ab679125b2806e86a2 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Ahmad Samir <[email protected]> (cherry picked from commit f20f12b) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
1 parent ba745fd commit 1f78da8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/corelib/global/qcompilerdetection.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,10 @@ QT_WARNING_DISABLE_MSVC(4706) /* assignment within conditional expression */
14431443
QT_WARNING_DISABLE_MSVC(4355) /* 'this' : used in base member initializer list */
14441444
QT_WARNING_DISABLE_MSVC(4710) /* function not inlined */
14451445
QT_WARNING_DISABLE_MSVC(4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */
1446+
# elif defined(Q_CC_CLANG_ONLY)
1447+
# if Q_CC_CLANG >= 2100
1448+
QT_WARNING_DISABLE_CLANG("-Wcharacter-conversion") /* until https://github.com/llvm/llvm-project/issues/163719 is fixed */
1449+
# endif
14461450
# elif defined(Q_CC_BOR)
14471451
# pragma option -w-inl
14481452
# pragma option -w-aus

0 commit comments

Comments
 (0)