From 6eb60232a9a66f188306b4d37f50bdf4a7bc24eb Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 8 Oct 2024 18:21:38 +1300 Subject: [PATCH] genbindings/typedefs: support type alias declarations --- cmd/genbindings/clang2il.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 884a3ad..802c618 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -130,14 +130,13 @@ nextTopLevel: // TODO e.g. qfuturewatcher.h // Probably can't be supported in the Go binding - case "TypeAliasDecl", // qglobal.h - "UsingDirectiveDecl", // qtextstream.h - "UsingDecl", // qglobal.h - "UsingShadowDecl": // global.h + case "UsingDirectiveDecl", // qtextstream.h + "UsingDecl", // qglobal.h + "UsingShadowDecl": // global.h // TODO e.g. // Should be treated like a typedef - case "TypedefDecl": + case "TypeAliasDecl", "TypedefDecl": td, err := processTypedef(node, addNamePrefix) if err != nil { return nil, fmt.Errorf("processTypedef: %w", err) @@ -329,7 +328,7 @@ nextMethod: ret.ChildClassdefs = append(ret.ChildClassdefs, child) - case "TypedefDecl": + case "TypeAliasDecl", "TypedefDecl": // Child class typedef td, err := processTypedef(node, nodename+"::") if err != nil {