summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parser.rs10
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