genbindings: enforce AllowVirtualForClass at construction time

This commit is contained in:
mappu 2024-11-23 19:34:05 +13:00
parent c36d14c540
commit 756086cd50

View File

@ -27,6 +27,12 @@ func astTransformBlocklist(parsed *CppParsedHeader) {
continue
}
// If this class is abstract, but we return !AllowVirtualForClass, then
// delete its constructors
if c.Abstract && !AllowVirtualForClass(c.ClassName) {
c.Ctors = nil
}
// Keep
parsed.Classes[j] = c
j++