diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-02-07 15:14:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 15:14:26 +0000 |
commit | 75ec12d1bb5f8b2e83d0548edd9982a1e7746639 (patch) | |
tree | c2775e75c393aab280598bb763db52d4859ccc3d /bindgen-tests/tests/headers/wrap-static-fns.h | |
parent | 3267ffc1ba88578607e0ea584896f2f1141cedf9 (diff) | |
parent | 2be14a33451b0259bfed8e0fe517502e46fab7b6 (diff) |
Diffstat (limited to 'bindgen-tests/tests/headers/wrap-static-fns.h')
-rw-r--r-- | bindgen-tests/tests/headers/wrap-static-fns.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bindgen-tests/tests/headers/wrap-static-fns.h b/bindgen-tests/tests/headers/wrap-static-fns.h new file mode 100644 index 00000000..8b90c7bc --- /dev/null +++ b/bindgen-tests/tests/headers/wrap-static-fns.h @@ -0,0 +1,33 @@ +// bindgen-flags: --experimental --wrap-static-fns + +static inline int foo() { + return 11; +} +static int bar() { + return 1; +} +inline int baz() { + return 2; +} + +static inline int takes_ptr(int* arg) { + return *arg + 1; +} + +static inline int takes_fn_ptr(int (*f)(int)) { + return f(1); +} + +static inline int takes_fn(int (f)(int)) { + return f(2); +} + +typedef int (func)(int); + +static inline int takes_alias(func f) { + return f(3); +} + +static inline int takes_qualified(const int *const *arg) { + return **arg; +} |