RFR: 7904089: jextract cannot handle "void foo(int foo)"
Nizar Benalla
nbenalla at openjdk.org
Wed Oct 15 15:53:04 UTC 2025
On Wed, 15 Oct 2025 14:10:47 GMT, Maurizio Cimadamore <mcimadamore 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.
I think that most of the time, they are the same.
`finalParameterNames` sometimes has the additional `x0`, `x1` parameters but we can check for conflicts with those as well.
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/292#discussion_r2433115766
More information about the jextract-dev
mailing list