Closed SimonDanisch closed 1 year ago
Hm, seems to go wrong on Clangs side already?
args = Union{Expr, Symbol}[:rpr_context, :(Ptr{rpr_float}), :Cint, :rpr_int, :(Ptr{rpr_float}), :Cint, :rpr_int, :(Ptr{rpr_int}), :Cint, :rpr_int, :rpr_int, :(Ptr{Ptr{rpr_float}}), :(Ptr{Cint}), :(Ptr{rpr_int}), :(Ptr{rpr_int}), :rpr_int, :(Ptr{rpr_int}), :rpr_int, :(Ptr{Ptr{rpr_int}}), :(Ptr{rpr_int}), :(Ptr{rpr_int}), :Cint, :(Ptr{rpr_shape})]
CLParmDecl a CLTypedef rpr_context context
CLParmDecl a pointer to `CLType (CLTypedef) ` vertices
CLParmDecl a CLInt int num_vertices
CLParmDecl a CLTypedef rpr_int vertex_stride
CLParmDecl a pointer to `CLType (CLTypedef) ` normals
CLParmDecl a CLInt int num_normals
CLParmDecl a CLTypedef rpr_int normal_stride
CLParmDecl a pointer to `CLType (CLTypedef) ` perVertexFlag
CLParmDecl a CLInt int num_perVertexFlags
CLParmDecl a CLTypedef rpr_int perVertexFlag_stride
CLParmDecl a CLTypedef rpr_int numberOfTexCoordLayers
CLParmDecl a pointer to `CLType (CLPointer) ` texcoords
CLParmDecl a pointer to `CLType (CLInt) ` num_texcoords
CLParmDecl a pointer to `CLType (CLTypedef) ` texcoord_stride
CLParmDecl a pointer to `CLType (CLTypedef) ` vertex_indices
CLParmDecl a CLTypedef rpr_int vidx_stride
CLParmDecl a pointer to `CLType (CLTypedef) ` normal_indices
CLParmDecl a CLTypedef rpr_int nidx_stride
CLParmDecl a pointer to `CLType (CLPointer) ` texcoord_indices
CLParmDecl a pointer to `CLType (CLTypedef) ` tidx_stride
CLParmDecl a pointer to `CLType (CLTypedef) ` num_face_vertices
CLParmDecl a CLInt int num_faces
CLParmDecl a pointer to `CLType (CLTypedef) ` out_mesh
See the CLParmDecl a CLInt int num_vertices
...
Maybe the included #include "cstddef"
in RadeonProRender_v2.h is not resolved correctly?
To quote from Slack:
It seems that the original C header is not well formed. The issue is fixed after I manually fixed the C header. Not all compilation errors can lead to bugs. If a type is translated mistakenly as int , then it’s almost 100% a compilation problem.
Clang version: v0.17.2
c header:
julia translation:
Generator code:
rpr.tom:
Repository: https://github.com/JuliaGraphics/RadeonProRender.jl/blob/master/build/generate-master.jl
The segfault resulting from it: https://github.com/JuliaLang/julia/issues/48865#issuecomment-1452289652
Am I doing something stupid, is the header file confusing Clang, or is Clang really mis-translating this? Would be really surprising, since Clang is used to wrap so many projects in Julia?