diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-15 18:09:00 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-15 18:09:00 +0100 |
commit | ce0a254131be56e3c437199c21f48a2d5428c91d (patch) | |
tree | c31d58253ef78e7631e15caf7aa007dc41d6ab03 /libbindgen/src | |
parent | 1129431b00cb3ab76dce0ab8b2956d319d939f3a (diff) |
ir: Do the proper thing for methods.
Diffstat (limited to 'libbindgen/src')
-rw-r--r-- | libbindgen/src/ir/function.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbindgen/src/ir/function.rs b/libbindgen/src/ir/function.rs index 1b930ac3..516c486e 100644 --- a/libbindgen/src/ir/function.rs +++ b/libbindgen/src/ir/function.rs @@ -187,7 +187,8 @@ impl FunctionSig { let is_method = cursor.kind() == CXCursor_CXXMethod; let is_constructor = cursor.kind() == CXCursor_Constructor; - if is_constructor && cursor.lexical_parent() != cursor.semantic_parent() { + if (is_constructor || is_method) && + cursor.lexical_parent() != cursor.semantic_parent() { // Only parse constructors once. return Err(ParseError::Continue); } |