RFR: 7904089: jextract cannot handle "void foo(int foo)"

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Oct 15 14:13:26 UTC 2025


On Wed, 15 Oct 2025 11:33:58 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

> Please review this change to fix a name conflicts between functions and name parameters.
> 
> TIA!

src/main/java/org/openjdk/jextract/impl/HeaderFileBuilder.java line 178:

> 176:         if (!isVarArg) {
> 177:             // function name may conflict with any of its parameter names.
> 178:             boolean nameConflict = parameterNames.contains(javaName);

should this use `finalParameterNames` ? Note that `finalParameterNames` might contain additional parameters -- e.g. for the segment allocator.

-------------

PR Review Comment: https://git.openjdk.org/jextract/pull/292#discussion_r2432724451


More information about the jextract-dev mailing list