Skip to content

bindgen hangs on c++ header #1918

Open
Open
@boydjohnson

Description

@boydjohnson

c++ header

template <typename> struct a;
template <typename, typename, typename, typename, typename, typename, typename, typename, typename, bool> struct b;
template <typename d, typename c, typename f, typename e, typename h, typename g, typename j, typename i, typename l>
struct b<d, c, f, e, h, g, j, i, l, true> {
  using k = a<l>;
  using n = typename k::n;
  using m = typename c ::o;
  m &p(const n &);
};
template <typename d, typename c, typename f, typename e, typename h, typename g, typename j, typename i, typename l>
auto b<d, c, f, e, h, g, j, i, l, true>::p(const n &) -> m & {}

bindgen test-case-5.hpp -- -x c++ hangs.

This hangs bindgen for at least several minutes. The interestingness test I used with creduce was that it would hang it for 2m:30s.

Using RUST_LOG=bindgen on the executable shows that it gets into the codegen phase.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions