Skip to content

Commit 98b3cdc

Browse files
committed
Add comment to incomplete types
1 parent 072189c commit 98b3cdc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bindgen/ir/TypeDef.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &s, const TypeDef &typeDef) {
1313
if (typeDef.type) {
1414
s << typeDef.getType()->str();
1515
} else {
16-
s << "native.CStruct0";
16+
s << "native.CStruct0 // incomplete type";
1717
}
1818
s << "\n";
1919
return s;

tests/samples/OpaqueTypes.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import scala.scalanative.native._
66
@native.link("bindgentests")
77
@native.extern
88
object OpaqueTypes {
9-
type struct_undefinedIncludedStruct = native.CStruct0
9+
type struct_undefinedIncludedStruct = native.CStruct0 // incomplete type
1010
type undefinedIncludedStruct = struct_undefinedIncludedStruct
1111
type struct_points = native.CStruct2[native.Ptr[struct_point], native.Ptr[struct_point]]
1212
type points = struct_points
1313
type struct_point = native.CStruct2[native.CInt, native.CInt]
1414
type union_u = native.CArray[Byte, native.Nat._4]
1515
type u = union_u
16-
type struct_undefinedStruct = native.CStruct0
16+
type struct_undefinedStruct = native.CStruct0 // incomplete type
1717
type struct_structWithPointerToUndefinedStruct = native.CStruct1[native.Ptr[struct_undefinedStruct]]
1818
type union_unionWithPointerToUndefinedStruct = native.CArray[Byte, native.Nat._8]
19-
type union_undefinedUnion = native.CStruct0
19+
type union_undefinedUnion = native.CStruct0 // incomplete type
2020
type undefinedUnion = union_undefinedUnion
2121
type aliasToPointerOfUndefinedUnion = native.Ptr[undefinedUnion]
2222
type aliasForUndefinedStruct = struct_undefinedStruct

0 commit comments

Comments
 (0)