File tree 4 files changed +46
-1
lines changed
4 files changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ impl Cursor {
241
241
self . x . kind
242
242
}
243
243
244
- /// Returns true is the cursor is a definition
244
+ /// Returns true if the cursor is a definition
245
245
pub fn is_definition ( & self ) -> bool {
246
246
unsafe { clang_isCursorDefinition ( self . x ) != 0 }
247
247
}
Original file line number Diff line number Diff line change @@ -1249,6 +1249,7 @@ impl CompInfo {
1249
1249
let mut ci = CompInfo :: new ( kind) ;
1250
1250
ci. is_forward_declaration =
1251
1251
location. map_or ( true , |cur| match cur. kind ( ) {
1252
+ CXCursor_ParmDecl => true ,
1252
1253
CXCursor_StructDecl | CXCursor_UnionDecl |
1253
1254
CXCursor_ClassDecl => !cur. is_definition ( ) ,
1254
1255
_ => false ,
Original file line number Diff line number Diff line change
1
+ #![ allow(
2
+ dead_code,
3
+ non_snake_case,
4
+ non_camel_case_types,
5
+ non_upper_case_globals
6
+ ) ]
7
+
8
+ #[ repr( C ) ]
9
+ #[ derive( Debug , Default , Copy , Clone ) ]
10
+ pub struct Struct {
11
+ pub _address : u8 ,
12
+ }
13
+ #[ test]
14
+ fn bindgen_test_layout_Struct ( ) {
15
+ assert_eq ! (
16
+ :: std:: mem:: size_of:: <Struct >( ) ,
17
+ 1usize ,
18
+ concat!( "Size of: " , stringify!( Struct ) )
19
+ ) ;
20
+ assert_eq ! (
21
+ :: std:: mem:: align_of:: <Struct >( ) ,
22
+ 1usize ,
23
+ concat!( "Alignment of " , stringify!( Struct ) )
24
+ ) ;
25
+ }
26
+ extern "C" {
27
+ #[ link_name = "\u{1} _ZN6Struct8FunctionER5Union" ]
28
+ pub fn Struct_Function ( this : * mut Struct , arg1 : * mut Union ) ;
29
+ }
30
+ impl Struct {
31
+ #[ inline]
32
+ pub unsafe fn Function ( & mut self , arg1 : * mut Union ) {
33
+ Struct_Function ( self , arg1)
34
+ }
35
+ }
36
+ #[ repr( C ) ]
37
+ #[ derive( Copy , Clone ) ]
38
+ pub struct Union {
39
+ _unused : [ u8 ; 0 ] ,
40
+ }
Original file line number Diff line number Diff line change
1
+ struct Struct
2
+ {
3
+ void Function (union Union&);
4
+ };
You can’t perform that action at this time.
0 commit comments