mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From e20e1ea0f5f9f9a0fe1c309a60cb5297f1276efc Mon Sep 17 00:00:00 2001
|
|
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
Date: Tue, 11 Apr 2023 14:38:01 +0200
|
|
Subject: shiboken6: Fix build with clang 16
|
|
|
|
getCursorSpelling() reports a name for unnamed enums.
|
|
|
|
Pick-to: 6.5 6.2 5.15
|
|
Task-number: PYSIDE-2288
|
|
Change-Id: Iaeb6409c8825dc0fb2720b450fb14e64bbf5d303
|
|
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
|
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
|
---
|
|
sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
|
|
index dce28f301..d5009e54f 100644
|
|
--- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
|
|
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp
|
|
@@ -903,6 +903,8 @@ static NamespaceType namespaceType(const CXCursor &cursor)
|
|
static QString enumType(const CXCursor &cursor)
|
|
{
|
|
QString name = getCursorSpelling(cursor); // "enum Foo { v1, v2 };"
|
|
+ if (name.contains(u"unnamed enum")) // Clang 16.0
|
|
+ return {};
|
|
if (name.isEmpty()) {
|
|
// PYSIDE-1228: For "typedef enum { v1, v2 } Foo;", type will return
|
|
// "Foo" as expected. Care must be taken to exclude real anonymous enums.
|
|
--
|
|
cgit v1.2.3
|
|
|