Skip to content

failed layout test for function when class name is same #1028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ctaggart opened this issue Sep 24, 2017 · 2 comments
Closed

failed layout test for function when class name is same #1028

ctaggart opened this issue Sep 24, 2017 · 2 comments

Comments

@ctaggart
Copy link

I'm not sure about the exact cause, but it looks like the layout tests may be failing if the class name is the same as the function name. I'm guessing. Here is the test case.

Input C/C++ Header

class a {
  virtual int b();
  int c;
};
class octave_function : a {
  bool d;
};

Bindgen Invocation

#!/usr/bin/env bash
set -eu
export RUST_BACKTRACE=1
clang-3.9 --std=c++11 -c __bindgen.ii

~/rust-bindgen/target/release/bindgen \
    --output __bindgen.rs \
    --enable-cxx-namespaces \
    --whitelist-type octave.* \
    --whitelist-function octave.* \
    --use-core \
    --raw-line "extern crate core;" \
    --opaque-type std::.* \
    __bindgen.ii \
    -- -v -x c++ -std=c++11 \
    2>/dev/null

rustc --test __bindgen.rs
./__bindgen \
    2>&1 \
    | grep 'test root::bindgen_test_layout_octave_function ... FAILED'

Actual Results

Layout tests fail.

Expected Results

Layout tests pass.

@emilio
Copy link
Contributor

emilio commented Sep 24, 2017

This is a dupe of #380, I'm pretty sure.

Thanks for the report though!

@emilio emilio closed this as completed Sep 24, 2017
@ctaggart
Copy link
Author

Well, you've got a new test case. I'll track that ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants