diff --git a/libbindgen/src/ir/comp.rs b/libbindgen/src/ir/comp.rs index d5d3426245..211f9f58ea 100644 --- a/libbindgen/src/ir/comp.rs +++ b/libbindgen/src/ir/comp.rs @@ -688,9 +688,9 @@ impl CompInfo { return CXChildVisit_Continue; } - if cur.is_inlined_function() { - return CXChildVisit_Continue; - } + //if cur.is_inlined_function() { + // return CXChildVisit_Continue; + //} let spelling = cur.spelling(); if spelling.starts_with("operator") { @@ -869,14 +869,14 @@ impl TypeCollector for CompInfo { type Extra = Item; fn collect_types(&self, - context: &BindgenContext, + ctx: &BindgenContext, types: &mut ItemSet, item: &Item) { if let Some(template) = self.specialized_template() { types.insert(template); } - let applicable_template_args = item.applicable_template_args(context); + let applicable_template_args = item.applicable_template_args(ctx); for arg in applicable_template_args { types.insert(arg); } @@ -893,6 +893,11 @@ impl TypeCollector for CompInfo { types.insert(ty); } - // FIXME(emilio): Methods, VTable? + // FIXME(emilio): Fix builds before running this by default. + if ctx.options().codegen_config.methods { + for method in self.methods() { + types.insert(method.signature); + } + } } } diff --git a/libbindgen/src/ir/ty.rs b/libbindgen/src/ir/ty.rs index 1878471dc2..551c1e37ae 100644 --- a/libbindgen/src/ir/ty.rs +++ b/libbindgen/src/ir/ty.rs @@ -785,7 +785,13 @@ impl Type { } CXType_Auto => { // We don't want to blow the stack. - assert!(canonical_ty != *ty, "Couldn't find deduced type"); + // MSVC builds hit this in the builtin definitions + if canonical_ty == *ty && ty.declaration().kind() == CXCursor_NoDeclFound { + warn!("Couldn't find deduced type for {:?}", ty); + return Err(ParseError::Continue); + } else { + assert!(canonical_ty != *ty, "Couldn't find deduced type"); + } return Self::from_clang_ty(potential_id, &canonical_ty, location,