From ed18c216f388801725022d9cf64a1a00ac3eb290 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 11 Nov 2024 18:25:40 +1300 Subject: [PATCH] genbindings/exceptions: move QGADGET to exceptions file --- cmd/genbindings/clang2il.go | 5 ----- cmd/genbindings/config-allowlist.go | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 06fc13b1..b76222d4 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -433,11 +433,6 @@ nextMethod: var mm CppMethod mm.MethodName = methodName - if strings.Contains(methodName, `QGADGET`) { - log.Printf("Skipping method %q with weird QGADGET behaviour\n", mm.MethodName) - continue - } - err := parseMethod(node, &mm) if err != nil { if errors.Is(err, ErrTooComplex) { diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 956dac39..c1510be8 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -197,6 +197,10 @@ func AllowMethod(className string, mm CppMethod) error { return ErrTooComplex // Skip private type } + if strings.Contains(mm.MethodName, `QGADGET`) { + return ErrTooComplex // Skipping method with weird QGADGET behaviour + } + if mm.IsReceiverMethod() { // Non-projectable receiver pattern parameters return ErrTooComplex