aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-10-16 14:25:35 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-10-16 14:58:12 +0200
commit002aed143126171771347945d2d1c46b9a8468ac (patch)
tree20869a69925f6e6495b4ba3af08358a230e88671 /sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
parente03b123e5ce17897112b5ad5c050706f5af91d83 (diff)
shiboken6: Silence clang warning occurring in Qt code
As of Clang 21, Qt code produces many warnings: "qchar.h:503:75: warning: implicit conversion from 'const char16_t' to 'char32_t' may change the meaning of the represented code unit" Exclude them. Upstream bug report: https://github.com/llvm/llvm-project/issues/163719 More discussion in: https://github.com/llvm/llvm-project/issues/138526 Task-number: QTBUG-141204 Pick-to: 6.10 6.8 Change-Id: I17df5aee49d71701ac55c34274cf7a62aab87d94 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
index fe5af06f2..4c63c3e88 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
@@ -249,6 +249,11 @@ static CXTranslationUnit createTranslationUnit(CXIndex index,
// https://github.com/darlinghq/darling/issues/204
#endif
"-Wno-constant-logical-operand",
+#if CINDEX_VERSION_MAJOR > 0 || CINDEX_VERSION_MINOR >= 64 // Clang 21
+ // QTBUG-141204: Suppress "character-conversion" warnings in Qt: qchar.h:... warning: implicit
+ // conversion from 'const char16_t' to 'char32_t' may change the meaning of the represented code unit.
+ "-Wno-character-conversion",
+#endif
"-x",
"c++" // Treat .h as C++, not C
};