diff options
author | Vladimir Vukicevic <vladimir@pobox.com> | 2016-05-31 16:26:33 -0400 |
---|---|---|
committer | Vladimir Vukicevic <vladimir@pobox.com> | 2016-07-18 17:32:03 -0400 |
commit | d0891faa56d61cfc5a41e6b32b9f6b7090715c9f (patch) | |
tree | 2553b750bf39d42ad11f5ce7c563d4f719b1309b | |
parent | 38f7561c8e28ce84cc651369dce7952352f5b82e (diff) |
Check method_is_virtual and flag has_vtable before deciding whether to skip method
-rw-r--r-- | src/parser.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/parser.rs b/src/parser.rs index 08c3bace..de1242be 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -903,6 +903,12 @@ fn visit_composite(cursor: &Cursor, parent: &Cursor, ci.base_members += 1; } CXCursor_CXXMethod => { + // Make sure to mark has_vtable properly, even if we + // would otherwise skip this method due to linkage/visibility. + if cursor.method_is_virtual() { + ci.has_vtable = true; + } + let linkage = cursor.linkage(); if linkage != CXLinkage_External { return CXChildVisit_Continue; @@ -955,10 +961,6 @@ fn visit_composite(cursor: &Cursor, parent: &Cursor, return false; } - if cursor.method_is_virtual() { - ci.has_vtable = true; - } - let mut sig = mk_fn_sig_resolving_typedefs(ctx, &cursor.cur_type(), cursor, &ci.typedefs); if !cursor.method_is_static() { // XXX what have i done |