Function pointer in a struct declaration

Calling clang_getCanonicalType on Unexposed works well, thanks for the tip.

It would be nice to know what function can be used on what type with confidence without checking for invalid type all the time, so again, perhaps there are test cases or references in the code that can shed some light?



This may help you, it’s similar to your project description in that it generates C# extern definitions (C# equivalent of JNI, I suppose):,#L75

The highlighted part is the relevant Function Pointer case where it checks that is a pointer type and then its canonical pointee type which should be a CXType_FunctionProto.