cbindgen
cbindgen copied to clipboard
`test_body` fails when using clang
test_body fail when using clang-11 due to -Wnon-c-typedef-for-linkage.
The following is the current cbindgen output that triggers the warning:
typedef struct {
int32_t i;
#ifdef __cplusplus
inline void foo();
#endif
} MyFancyStruct;
I am opening an issue because I don't know if you would prefer to fix the test or ignore the warning in tests.rs.
Huh, is that a new warning? We greened up clang tests not that long ago...
But yeah, this looks like an issue with the generated code, potentially. But since that inline void foo(); is adding via the configuration, we might want to just silence the warning, or turn the condition into something like:
#if defined(__cplusplus) && !defined(CBINDGEN_STYLE_TAG)
Or something of that sort.
any update on this?