-
Notifications
You must be signed in to change notification settings - Fork 768
Closed
adetaylor/rust-bindgen
#10Description
When using bindgen with an assertions-enabled libclang build, the following code fails an assertion.
The assertion indicates either bindgen or the internals of libclang are requesting const eval of sizeof(c) which depends on a type parameter of the template.
Input C++ Header
template <class a> class b {
a : sizeof(a);
};Previous, less reduced case
template <class a> class b {
typedef a c;
struct {
c : sizeof(c);
};
};Bindgen Invocation
cargo test on chbaker0@a17d868
Ignore the changes to Cargo.toml; that was just to link with a static libclang build.
Actual Results
tests-a8e2fa07fdd9a37d: /b/s/w/ir/cache/builder/src/third_party/llvm/clang/lib/AST/ExprConstant.cpp:15219: llvm::APSInt clang::Expr::EvaluateKnownConstInt(const clang::ASTContext &, SmallVectorImpl<clang::PartialDiagnosticAt> *) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.
error: test failed, to rerun pass '--test tests
Expected Results
No assertion failure
Metadata
Metadata
Assignees
Labels
No labels