Open emilio opened 7 years ago
Ah yes, I was kind of afraid of this :/
Suggestions are welcome how I should handle this, the template handling stuff is a bit harder to grok in bindgen.
So before the objc template params came up as an typedef, but now they seem to be TypeRefs, which I think aligns with, and are handled, as proper template params. And to keep things simple I'd just want the type to be replaced with the ‘id’.
I almost got it working hacking Item::named_type() to rewrite the name to "id" when location.referenced().typedef_type().kind() == CXType_ObjCId, but that made it also mut-pointer. Also I kind of feel that it should be done earlier in the parsing.
I suppose making it behave like a proper generic in rust land would also be an option, but so far I have not looked in to that.
Running the tests on LLVM trunk with (or without) #694 yields:
cc @scoopr