rust-lang / rust-lang/rust-bindgen

Removing empty argument list fallback breaks objective-c test.

Open
#1,786 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-libclang enhancement
Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

CC @simlay

In #1781 I added a fallback path to the usual "grab the argument names" code:

https://github.com/rust-lang/rust-bindgen/blob/b1a1ebc918e44f4aa928878dae20fa7be6c87043/src/ir/function.rs#L430

I found a better way to handle the original test-case (#1785), but the objective-c test that #1781 fixed is still not fixed by that.

I took a look at the clang ast (with --emit-clang-ast) and the arguments don't seem to be exposed there, so this probably needs libclang changes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/ir/function.rs around the linked argument-name handling code, then reproduce the Objective-C case with --emit-clang-ast and compare the available arguments. The issue is done when removing the empty argument list fallback no longer breaks the Objective-C test, likely requiring a libclang change.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c, rust
Domain
compilers, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.