aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-10-12 09:33:53 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-10-12 10:36:18 +0200
commit1948a1b6f9a3547ba9fba9b8c525eb6e1c6b4f13 (patch)
treecbab3845cf23543db17a289492501fa456ca81f7
parent0c4b73611801c788849f0bcf93737c670b61ee03 (diff)
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: I4d463132b8bd3fffa0b57f03be6c58ecbae94a49 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
index 5ea4af308..3ef826deb 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
@@ -923,8 +923,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;
}