diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-07-25 11:17:11 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-07-25 12:06:38 +0200 |
commit | ef2ee38f3a1a2e0d169a610b9bd7bf52ea966059 (patch) | |
tree | 864636deeaa0f7b2c706e98bcb6144bb6ffe7646 /tests | |
parent | 105b9422cd5f8cd7aca9def458c157be219a03ff (diff) |
ty: Use canonical type to access pointee.
Using the canonical type fixes this but changes the output of some tests
(in particular, pointer to typedefs now point to the underlying type).
So do this only in known-bad cases.
Fixes #2244
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expectations/tests/pointer-attr.rs | 10 | ||||
-rw-r--r-- | tests/headers/pointer-attr.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/expectations/tests/pointer-attr.rs b/tests/expectations/tests/pointer-attr.rs new file mode 100644 index 00000000..95fe9c5f --- /dev/null +++ b/tests/expectations/tests/pointer-attr.rs @@ -0,0 +1,10 @@ +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] + +extern "C" { + pub fn a(arg1: *const ::std::os::raw::c_char); +} diff --git a/tests/headers/pointer-attr.h b/tests/headers/pointer-attr.h new file mode 100644 index 00000000..fe0004b8 --- /dev/null +++ b/tests/headers/pointer-attr.h @@ -0,0 +1 @@ +void a(const char __attribute__((btf_type_tag("a"))) *); |