Skip to content

Commit 31bd2d3

Browse files
committed
ir: Don't parse standalone destructors.
1 parent 0ec5a6a commit 31bd2d3

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

libbindgen/src/ir/function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ impl ClangSubItemParser for Function {
242242
-> Result<ParseResult<Self>, ParseError> {
243243
use clang_sys::*;
244244
match cursor.kind() {
245+
// FIXME(emilio): Generate destructors properly.
245246
CXCursor_FunctionDecl |
246247
CXCursor_Constructor |
247-
CXCursor_Destructor |
248248
CXCursor_CXXMethod => {}
249249
_ => return Err(ParseError::Continue),
250250
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(non_snake_case)]
5+
6+
7+
#[repr(C)]
8+
#[derive(Debug)]
9+
pub struct cv_String {
10+
pub _address: u8,
11+
}
12+
#[test]
13+
fn bindgen_test_layout_cv_String() {
14+
assert_eq!(::std::mem::size_of::<cv_String>() , 1usize);
15+
assert_eq!(::std::mem::align_of::<cv_String>() , 1usize);
16+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
namespace cv {
4+
class String {
5+
public:
6+
~String();
7+
};
8+
9+
10+
inline
11+
String::~String()
12+
{
13+
}
14+
15+
}

0 commit comments

Comments
 (0)