Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.12.0
-
None
Description
Qt5.12.0 from qt installer MSVC2017 command Line tools
python3.7.2, libclang7.0.1 compiled from sources
compiling with :
python setup.py build --qmake=C:\Qt\5.12.0\msvc2017_64\bin\qmake.exe --build-tests --ignore-git --verbose-build --relwithdebinfo --reuse-build
*bails out when generating QtGui
This occurs due to CXCursor travers visits itself
Suggested fix: (works for me)
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp index e116f8b8..3300b6dd 100644 --- a/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp +++ b/sources/shiboken2/ApiExtractor/clangparser/clangparser.cpp @@ -117,7 +117,7 @@ QString BaseVisitor::getCodeSnippetString(const CXCursor &cursor) } static CXChildVisitResult - visitorCallback(CXCursor cursor, CXCursor /* parent */, CXClientData clientData) + visitorCallback(CXCursor cursor, CXCursor parent, CXClientData clientData) { BaseVisitor *bv = reinterpret_cast<BaseVisitor *>(clientData);@@ -125,6 +125,10 @@ static CXChildVisitResult if (!bv->visitLocation(location)) return CXChildVisit_Continue; + // guard against recursive invokations + if (clang_equalLocations(location , clang_getCursorLocation(parent))) + return CXChildVisit_Continue; + const BaseVisitor::StartTokenResult startResult = bv->cbHandleStartToken(cursor); switch (startResult) { case clang::BaseVisitor::Error:
Might be what is related to PYSIDE-739
Attachments
Issue Links
- relates to
-
PYSIDE-739 Windows build fails during QtGui bindings generation running shiboken2
- Closed