aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-04-28 11:05:17 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-04-30 16:44:45 +0200
commit909f80fbb6346c5be434a06d591e41082e92ec18 (patch)
tree75d00926cd2d964b562ebbd8383dba632ddc2439 /sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
parente55bad3c11de793828fb1bdb503d1631c153a488 (diff)
Allow for building with Clang 14 (Yocto)
Replace clang functions clang_CXXMethod_isCopyAssignmentOperator() and clang_CXXMethod_isMoveAssignmentOperator() by a manual check function depending on clang version. Amends 6410710ab9580f71ab58ac38e67d74bbde5dbce4. Complements b887919ea244a057f15be9c1cdc652538e3fe9a0. Fixes: PYSIDE-3091 Task-number: PYSIDE-3004 Pick-to: 6.9 Change-Id: I18b073e7fe572ffe8b4635a26cec45b0b6adbac3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
index 6a2ae9128..5188262de 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
@@ -370,10 +370,12 @@ static inline CodeModel::FunctionType functionTypeFromCursor(const CXCursor &cur
result = CodeModel::Destructor;
break;
case CXCursor_CXXMethod:
+#ifdef CLANG_HAS_ASSIGNMENT_OPERATOR_CHECK
if (clang_CXXMethod_isCopyAssignmentOperator(cursor) != 0)
result = CodeModel::AssignmentOperator;
else if (clang_CXXMethod_isMoveAssignmentOperator(cursor) != 0)
result = CodeModel::MoveAssignmentOperator;
+#endif
break;
default:
break;