Closed
Description
Clang trunk recently moved some declarations around, which ended up exposing them in what Firefox processes for bindings, and this breaks bindgen:
Input C/C++ Header
typedef _Float16 __v8hf __attribute__((__vector_size__(16), __aligned__(16)));
typedef _Float16 __m128h __attribute__((__vector_size__(16), __aligned__(16)));
typedef _Float16 __m128h_u __attribute__((__vector_size__(16), __aligned__(1)));
typedef __bf16 __v8bf __attribute__((__vector_size__(16), __aligned__(16)));
typedef __bf16 __m128bh __attribute__((__vector_size__(16), __aligned__(16)));
Bindgen Invocation
bindgen::Builder::default()
.header("input.h")
.generate()
.unwrap()
Actual Results
thread 'main' panicked at 'Not able to resolve vector element?: Continue', bindgen/ir/ty.rs:1149:22
stack backtrace:
0: rust_begin_unwind
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5
3: core::result::Result<T,E>::expect
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1064:23
4: bindgen::ir::ty::Type::from_clang_ty
at ./bindgen/ir/ty.rs:1143:33
5: <bindgen::ir::item::Item as bindgen::parse::ClangItemParser>::from_ty_with_id
at ./bindgen/ir/item.rs:1668:22
6: <bindgen::ir::item::Item as bindgen::parse::ClangItemParser>::from_ty
at ./bindgen/ir/item.rs:1565:9
7: bindgen::ir::context::BindgenContext::resolve_typerefs
at ./bindgen/ir/context.rs:908:36
8: bindgen::ir::context::BindgenContext::gen
at ./bindgen/ir/context.rs:1144:9
9: bindgen::codegen::codegen
at ./bindgen/codegen/mod.rs:4462:5
10: bindgen::Bindings::generate
at ./bindgen/./lib.rs:2540:43
11: bindgen::Builder::generate
at ./bindgen/./lib.rs:1580:9
12: testcase::main
at ./testcase/src/main.rs:5:5
13: core::ops::function::FnOnce::call_once
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Insert panic message and backtrace (set the `RUST_BACKTRACE=1` env var) here.
Metadata
Metadata
Assignees
Labels
No labels