Fix inline function identification · rust-lang/rust-bindgen@ed3aa90 (original) (raw)

4 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ class Foo {
8 8 };
9 9
10 10 template
11 -inline void
11 +void
12 12 Foo::doBaz() {
13 13 }
14 14
@@ -21,6 +21,5 @@ template
21 21 Foo::Foo() {
22 22 }
23 23
24 -inline
25 24 Bar::Bar() {
26 25 }
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
1 1
2 -
3 2 namespace cv {
4 -class String {
5 -public:
6 -~String();
7 -};
3 + class Foo {
4 + public:
5 + ~Foo();
6 + };
8 7
8 +Foo::~Foo() {}
9 9
10 -inline
11 -String::~String()
12 -{
13 -}
10 +class Bar {
11 +public:
12 +~Bar();
13 + };
14 +
15 +inline
16 +Bar::~Bar() {}
14 17
15 18 }
Original file line number Diff line number Diff line change
@@ -675,7 +675,11 @@ impl ClangSubItemParser for Function {
675 675 return Err(ParseError::Continue);
676 676 }
677 677
678 -if cursor.is_inlined_function() {
678 +if cursor.is_inlined_function() |
679 + cursor
680 +.definition()
681 +.map_or(false, |x
682 +{
679 683 if !context.options().generate_inline_functions {
680 684 return Err(ParseError::Continue);
681 685 }