Files
cbindgen/tests/expectations/simplify_option_ptr.both.c
T
Emilio Cobos Álvarez f922f68531 ir: Avoid generating bogus pointer arguments.
Now that we track nullability in the pointer type it's easy to do it.

Fixes #223
2021-01-14 23:39:59 +01:00

31 lines
627 B
C

#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
typedef struct Opaque Opaque;
typedef struct Option_____Opaque Option_____Opaque;
typedef struct Option_______c_void Option_______c_void;
typedef struct Foo {
const struct Opaque *x;
struct Opaque *y;
void (*z)(void);
struct Option_______c_void *zz;
} Foo;
typedef union Bar {
const struct Opaque *x;
struct Opaque *y;
void (*z)(void);
struct Option_______c_void *zz;
} Bar;
void root(const struct Opaque *a,
struct Opaque *b,
struct Foo c,
union Bar d,
struct Option_____Opaque *e);