diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-02-04 09:29:23 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-02-11 16:57:16 +0100 |
| commit | 6410710ab9580f71ab58ac38e67d74bbde5dbce4 (patch) | |
| tree | ecdbf3c58dd4aa13c9e4dafb45ce5fae0a7da79b /sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp | |
| parent | af7a0c68c2b008527871ccf4135e29dba502b6b0 (diff) | |
shiboken6: Handle further class special functions
- Obtain (copy) assignment operators from libclang and introduce
another function type for assignments from other types, which do not
impact copy-constructibility.
- Handle deleted assignment/move assignment.
- Add function query operators.
- Disable adding of implicit copy constructor when assignment/move
is present.
Testing follows in a subsequent patch.
Task-number: PYSIDE-3004
Change-Id: I11451bada3f970fb76e80b8ee76e1406441bb9db
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.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp index 7cfb0e747..23c2c75fe 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp @@ -369,6 +369,12 @@ static inline CodeModel::FunctionType functionTypeFromCursor(const CXCursor &cur case CXCursor_Destructor: result = CodeModel::Destructor; break; + case CXCursor_CXXMethod: + if (clang_CXXMethod_isCopyAssignmentOperator(cursor) != 0) + result = CodeModel::AssignmentOperator; + else if (clang_CXXMethod_isMoveAssignmentOperator(cursor) != 0) + result = CodeModel::MoveAssignmentOperator; + break; default: break; } |
