Skip to content

Commit 601baa2

Browse files
committed
Create clang-9-specific test directory, as a copy of clang-5.
1 parent acc7664 commit 601baa2

11 files changed

+378
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
#![allow(
4+
dead_code,
5+
non_snake_case,
6+
non_camel_case_types,
7+
non_upper_case_globals
8+
)]
9+
10+
extern "C" {
11+
#[link_name = "\u{1}_Z1bcz"]
12+
pub fn b(arg1: ::std::os::raw::c_char, ...) -> ::std::os::raw::c_char;
13+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
7+
#[repr(C)]
8+
#[derive(Debug, Default, Copy, Clone)]
9+
pub struct Foo {
10+
pub _address: u8,
11+
}
12+
pub const Foo_kFoo: bool = true;
13+
#[test]
14+
fn bindgen_test_layout_Foo() {
15+
assert_eq!(
16+
::std::mem::size_of::<Foo>(),
17+
1usize,
18+
concat!("Size of: ", stringify!(Foo))
19+
);
20+
assert_eq!(
21+
::std::mem::align_of::<Foo>(),
22+
1usize,
23+
concat!("Alignment of ", stringify!(Foo))
24+
);
25+
}
26+
#[repr(C)]
27+
#[derive(Debug, Default, Copy, Clone)]
28+
pub struct Bar {
29+
pub _address: u8,
30+
}
31+
extern "C" {
32+
#[link_name = "\u{1}_Z5Test2v"]
33+
pub fn Test2() -> ::std::os::raw::c_uint;
34+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
#![allow(
4+
dead_code,
5+
non_snake_case,
6+
non_camel_case_types,
7+
non_upper_case_globals
8+
)]
9+
#![cfg(not(test))]
10+
11+
#[repr(C)]
12+
#[derive(Default, Copy, Clone)]
13+
pub struct JNINativeInterface_ {
14+
pub GetVersion: ::std::option::Option<
15+
unsafe extern "stdcall" fn(env: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
16+
>,
17+
pub __bindgen_padding_0: u32,
18+
pub __hack: ::std::os::raw::c_ulonglong,
19+
}
20+
#[test]
21+
fn bindgen_test_layout_JNINativeInterface_() {
22+
assert_eq!(
23+
::std::mem::size_of::<JNINativeInterface_>(),
24+
16usize,
25+
concat!("Size of: ", stringify!(JNINativeInterface_))
26+
);
27+
assert_eq!(
28+
::std::mem::align_of::<JNINativeInterface_>(),
29+
8usize,
30+
concat!("Alignment of ", stringify!(JNINativeInterface_))
31+
);
32+
assert_eq!(
33+
unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize },
34+
0usize,
35+
concat!(
36+
"Offset of field: ",
37+
stringify!(JNINativeInterface_),
38+
"::",
39+
stringify!(GetVersion)
40+
)
41+
);
42+
assert_eq!(
43+
unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize },
44+
8usize,
45+
concat!(
46+
"Offset of field: ",
47+
stringify!(JNINativeInterface_),
48+
"::",
49+
stringify!(__hack)
50+
)
51+
);
52+
}
53+
extern "stdcall" {
54+
pub fn bar();
55+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
7+
pub const k: bool = true;
8+
#[repr(C)]
9+
#[derive(Debug, Default, Copy, Clone)]
10+
pub struct A {
11+
pub _address: u8,
12+
}
13+
pub const A_k: bool = false;
14+
#[test]
15+
fn bindgen_test_layout_A() {
16+
assert_eq!(
17+
::std::mem::size_of::<A>(),
18+
1usize,
19+
concat!("Size of: ", stringify!(A))
20+
);
21+
assert_eq!(
22+
::std::mem::align_of::<A>(),
23+
1usize,
24+
concat!("Alignment of ", stringify!(A))
25+
);
26+
}
27+
pub type foo = bool;
28+
pub const k2: foo = true;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
#![allow(
4+
dead_code,
5+
non_snake_case,
6+
non_camel_case_types,
7+
non_upper_case_globals
8+
)]
9+
10+
pub const foo: _bindgen_ty_1 = _bindgen_ty_1::foo;
11+
pub const bar: _bindgen_ty_1 = _bindgen_ty_1::bar;
12+
#[repr(u32)]
13+
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
14+
pub enum _bindgen_ty_1 {
15+
foo = 4,
16+
bar = 8,
17+
}
18+
pub type EasyToOverflow = ::std::os::raw::c_ulonglong;
19+
pub const k: EasyToOverflow = 2147483648;
20+
pub const k_expr: EasyToOverflow = 1152921504606846976;
21+
pub const wow: EasyToOverflow = 2147483648;
22+
pub const BAZ: ::std::os::raw::c_longlong = 24;
23+
pub const fuzz: f64 = 51.0;
24+
pub const BAZZ: ::std::os::raw::c_char = 53;
25+
pub const WAT: ::std::os::raw::c_char = 0;
26+
pub const bytestring: &'static [u8; 4usize] = b"Foo\0";
27+
pub const NOT_UTF8: [u8; 5usize] = [240u8, 40u8, 140u8, 40u8, 0u8];
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
#![allow(
4+
dead_code,
5+
non_snake_case,
6+
non_camel_case_types,
7+
non_upper_case_globals
8+
)]
9+
#![allow(overflowing_literals)]
10+
11+
pub const a: u32 = 4294967291;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
7+
#[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
8+
pub mod root {
9+
#[allow(unused_imports)]
10+
use self::super::root;
11+
#[repr(C)]
12+
#[derive(Debug, Copy, Clone)]
13+
pub struct Rooted<T> {
14+
pub member: T,
15+
pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>,
16+
}
17+
impl<T> Default for Rooted<T> {
18+
fn default() -> Self {
19+
unsafe { ::std::mem::zeroed() }
20+
}
21+
}
22+
pub type AutoValueVector_Alias = ::std::os::raw::c_int;
23+
#[test]
24+
fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation() {
25+
assert_eq!(
26+
::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>(),
27+
4usize,
28+
concat!(
29+
"Size of template specialization: ",
30+
stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > )
31+
)
32+
);
33+
assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) );
34+
}
35+
#[test]
36+
fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation() {
37+
assert_eq ! ( :: std :: mem :: size_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) );
38+
assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) );
39+
}
40+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
7+
extern "C" {
8+
pub fn foo();
9+
}
10+
#[repr(C)]
11+
#[derive(Debug, Default, Copy, Clone)]
12+
pub struct Foo {
13+
pub _address: u8,
14+
}
15+
extern "C" {
16+
#[link_name = "\u{1}?sBar@Foo@@2_NA"]
17+
pub static mut Foo_sBar: bool;
18+
}
19+
#[test]
20+
fn bindgen_test_layout_Foo() {
21+
assert_eq!(
22+
::std::mem::size_of::<Foo>(),
23+
1usize,
24+
concat!("Size of: ", stringify!(Foo))
25+
);
26+
assert_eq!(
27+
::std::mem::align_of::<Foo>(),
28+
1usize,
29+
concat!("Alignment of ", stringify!(Foo))
30+
);
31+
}
32+
extern "fastcall" {
33+
pub fn fast_call_func_no_args() -> ::std::os::raw::c_int;
34+
}
35+
extern "fastcall" {
36+
pub fn fast_call_func_many_args(
37+
arg1: ::std::os::raw::c_int,
38+
arg2: ::std::os::raw::c_int,
39+
arg3: ::std::os::raw::c_int,
40+
) -> ::std::os::raw::c_int;
41+
}
42+
extern "stdcall" {
43+
pub fn std_call_func_no_args() -> ::std::os::raw::c_int;
44+
}
45+
extern "stdcall" {
46+
pub fn std_call_func_many_args(
47+
arg1: ::std::os::raw::c_int,
48+
arg2: ::std::os::raw::c_int,
49+
arg3: ::std::os::raw::c_int,
50+
) -> ::std::os::raw::c_int;
51+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
#![cfg(target_os="macos")]
7+
8+
#[macro_use]
9+
extern crate objc;
10+
#[allow(non_camel_case_types)]
11+
pub type id = *mut objc::runtime::Object;
12+
pub trait Foo {
13+
unsafe fn get(self)
14+
-> *mut ObjectType;
15+
}
16+
impl Foo for id {
17+
unsafe fn get(self) -> *mut ObjectType { msg_send!(self , get) }
18+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
7+
#[repr(C)]
8+
#[derive(Debug, Default, Copy, Clone)]
9+
pub struct Base {
10+
pub _address: u8,
11+
}
12+
#[repr(C)]
13+
#[derive(Debug, Default, Copy, Clone)]
14+
pub struct Derived {
15+
pub b: bool,
16+
}
17+
#[repr(C)]
18+
#[derive(Debug, Default, Copy, Clone)]
19+
pub struct Usage {
20+
pub _address: u8,
21+
}
22+
extern "C" {
23+
#[link_name = "\u{1}_ZN5Usage13static_memberE"]
24+
pub static mut Usage_static_member: [u32; 2usize];
25+
}
26+
#[test]
27+
fn bindgen_test_layout_Usage() {
28+
assert_eq!(
29+
::std::mem::size_of::<Usage>(),
30+
1usize,
31+
concat!("Size of: ", stringify!(Usage))
32+
);
33+
assert_eq!(
34+
::std::mem::align_of::<Usage>(),
35+
1usize,
36+
concat!("Alignment of ", stringify!(Usage))
37+
);
38+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
#![allow(
4+
dead_code,
5+
non_snake_case,
6+
non_camel_case_types,
7+
non_upper_case_globals
8+
)]
9+
10+
#[repr(C)]
11+
#[derive(Debug, Copy, Clone)]
12+
pub struct Rooted {
13+
pub ptr: MaybeWrapped<::std::os::raw::c_int>,
14+
}
15+
#[test]
16+
fn bindgen_test_layout_Rooted() {
17+
assert_eq!(
18+
::std::mem::size_of::<Rooted>(),
19+
4usize,
20+
concat!("Size of: ", stringify!(Rooted))
21+
);
22+
assert_eq!(
23+
::std::mem::align_of::<Rooted>(),
24+
4usize,
25+
concat!("Alignment of ", stringify!(Rooted))
26+
);
27+
assert_eq!(
28+
unsafe { &(*(::std::ptr::null::<Rooted>())).ptr as *const _ as usize },
29+
0usize,
30+
concat!(
31+
"Offset of field: ",
32+
stringify!(Rooted),
33+
"::",
34+
stringify!(ptr)
35+
)
36+
);
37+
}
38+
impl Default for Rooted {
39+
fn default() -> Self {
40+
unsafe { ::std::mem::zeroed() }
41+
}
42+
}
43+
/// <div rustbindgen replaces="MaybeWrapped"></div>
44+
pub type MaybeWrapped<a> = a;
45+
#[test]
46+
fn __bindgen_test_layout_MaybeWrapped_open0_int_close0_instantiation() {
47+
assert_eq!(
48+
::std::mem::size_of::<MaybeWrapped<::std::os::raw::c_int>>(),
49+
4usize,
50+
concat!(
51+
"Size of template specialization: ",
52+
stringify!(MaybeWrapped<::std::os::raw::c_int>)
53+
)
54+
);
55+
assert_eq!(
56+
::std::mem::align_of::<MaybeWrapped<::std::os::raw::c_int>>(),
57+
4usize,
58+
concat!(
59+
"Alignment of template specialization: ",
60+
stringify!(MaybeWrapped<::std::os::raw::c_int>)
61+
)
62+
);
63+
}

0 commit comments

Comments
 (0)