crystal-lang / crystal_lib

Automatic binding generator for native libraries in Crystal
138 stars 30 forks source link

Clang::Type::Kind::Elaborated support for clang 3.9 #34

Open danny8376 opened 7 years ago

danny8376 commented 7 years ago

Since clang 3.9 introduced new Elaborated type, leading sturct typedef unbindable.

crystal src/main.cr -- examples/libc.cr
Don't know how to convert struct div_t (119) (Exception)
0x496e37: *CallStack::unwind:Array(Pointer(Void)) at ??
0x496dca: *CallStack#initialize:Array(Pointer(Void)) at ??
0x496d9a: *CallStack::new:CallStack at ??
0x485f0e: *raise:NoReturn at ??
0x485efe: ??? at ??
0x59458d: *CrystalLib::Parser#type:CrystalLib::Type+ at ??
0x5957ce: *CrystalLib::Parser#visit_typedef_declaration:CrystalLib::Typedef at ??
0x592cc0: *CrystalLib::Parser#visit:(CrystalLib::ASTNode+ | Nil) at ??
0x49454d: ~procProc(Clang::Cursor, Clang::VisitResult) at ??
0x4944b0: ~procProc(LibClang::Cursor, LibClang::Cursor, Pointer(Void), Clang::VisitResult) at ??
0x7f7859fa7f15: ??? at ??
0x7f7859fa745d: ??? at ??
0x7f7859fa7582: ??? at ??
0x7f7859fa7bac: ??? at ??
0x7f7859fb0704: clang_visitChildren at ??
0x5975c8: *Clang::Cursor#visit_children<&Proc(Clang::Cursor, Clang::VisitResult)>:UInt32 at ??
0x592a7e: *CrystalLib::Parser#parse:UInt32 at ??
0x5927bc: *CrystalLib::Parser::parse:Array(CrystalLib::ASTNode+) at ??
0x58f6bb: *CrystalLib::LibTransformer#transform:Crystal::LibDef at ??
0x544715: *Crystal::ASTNode+ at ??
0x58febb: *CrystalLib::LibTransformer at ??
0x544745: *Crystal::ASTNode+ at ??
0x48596d: ??? at ??
0x492ab9: main at ??
0x7f7858a75291: __libc_start_main at ??
0x48513a: _start at ??
0x0: ??? at ??