diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-11-30 13:13:51 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-12-07 12:18:35 +0100 |
commit | aa9849ba06cb99a5b0917a2e7b33406fe6f76d0c (patch) | |
tree | 440eefac38dcec287ec1cdfd2ee2a2719279b88b /bindgen/codegen | |
parent | a9d41985313f2f4e35a15fe1a94724fb373d051c (diff) |
codegen: Do generate field offset checks for classes with multiple bases.
The bug only affects virtual inheritance, so instead disable layout
tests in the test that we know is broken. Not generating layout tests is
wrong anyways, because the offset would be wrong.
Diffstat (limited to 'bindgen/codegen')
-rw-r--r-- | bindgen/codegen/mod.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs index 154d7fd1..c297aaab 100644 --- a/bindgen/codegen/mod.rs +++ b/bindgen/codegen/mod.rs @@ -2193,16 +2193,7 @@ impl CodeGenerator for CompInfo { }) }; - // FIXME when [issue #465](https://github.com/rust-lang/rust-bindgen/issues/465) ready - let too_many_base_vtables = self - .base_members() - .iter() - .filter(|base| base.ty.has_vtable(ctx)) - .count() > - 1; - - let should_skip_field_offset_checks = - is_opaque || too_many_base_vtables; + let should_skip_field_offset_checks = is_opaque; let check_field_offset = if should_skip_field_offset_checks { |