Current Problem:
The current implementation in inComplete() function (type.go:336-338) incorrectly treats empty struct definitions and forward declarations as the same thing by only checking if the fields list is empty:
https://github.com/goplus/llcppg/blob/5c906680a5817e206ebf77640f05d0505a6a1aa5/cl/internal/convert/type.go#L332-L338
This causes both cases to be treated as incomplete types:
- Empty struct definition: struct A {}
- Forward declaration: struct A;
Impact:
- Empty structs are incorrectly marked as forward declarations
- Type completeness detection is inaccurate
- May affect code generation and type checking
Current Problem:
The current implementation in inComplete() function (type.go:336-338) incorrectly treats empty struct definitions and forward declarations as the same thing by only checking if the fields list is empty:
https://github.com/goplus/llcppg/blob/5c906680a5817e206ebf77640f05d0505a6a1aa5/cl/internal/convert/type.go#L332-L338
This causes both cases to be treated as incomplete types:
Impact: