From: Friedemann Kleint Date: Tue, 12 Oct 2021 07:33:53 +0000 (+0200) Subject: shiboken6: Adapt to LLVM 12.01 X-Git-Tag: archive/raspbian/5.15.2-2.3+rpi1~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4c27a4920076ec6e2773b6306abdec9bbc1cd591;p=pyside2.git shiboken6: Adapt to LLVM 12.01 The identifier for anonymous enums has been changed, causing shiboken to no longer recognize them. (cherry picked from commit 1948a1b6f9a3547ba9fba9b8c525eb6e1c6b4f13) Gbp-Pq: Name shiboken6-Adapt-to-LLVM-12.01.patch --- diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp index 73b1aca..c6f3bb8 100644 --- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp +++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp @@ -887,8 +887,10 @@ static QString enumType(const CXCursor &cursor) // PYSIDE-1228: For "typedef enum { v1, v2 } Foo;", type will return // "Foo" as expected. Care must be taken to exclude real anonymous enums. name = getTypeName(clang_getCursorType(cursor)); - if (name.contains(QLatin1String("(anonymous"))) + if (name.contains(u"(unnamed") // Clang 12.0.1 + || name.contains(u"(anonymous")) { // earlier name.clear(); + } } return name; }