forked from pool/python3-pyside2
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
|
From b9bd01e741fd71d8efd917159fab1815ec3a14de Mon Sep 17 00:00:00 2001
|
||
|
From: Christophe Giboudeaux <christophe@krop.fr>
|
||
|
Date: Tue, 12 Oct 2021 15:51:36 +0200
|
||
|
Subject: [PATCH] Backport LLVM 13 fix from shiboken6
|
||
|
|
||
|
From a4a5fa4568473dd63bf04c9bfd115d3cbe3c504e Mon Sep 17 00:00:00 2001
|
||
|
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
||
|
Date: Tue, 12 Oct 2021 09:33:53 +0200
|
||
|
Subject: [PATCH] shiboken6: Adapt to LLVM 12.01
|
||
|
|
||
|
The identifier for anonymous enums has been changed, causing
|
||
|
shiboken to no longer recognize them.
|
||
|
|
||
|
Pick-to: 6.2 5.15
|
||
|
Task-number: PYSIDE-1686
|
||
|
|
||
|
Change-Id: I1dadc39d6b838bf36009cb8e02ef5e0667e6339e
|
||
|
---
|
||
|
sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp | 4 +++-
|
||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
|
||
|
index 73b1aca63..9cd1c6bc1 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;
|
||
|
}
|
||
|
--
|
||
|
2.33.0
|
||
|
|