RFR: 7904089: jextract cannot handle "void foo(int foo)"
Nizar Benalla
nbenalla at openjdk.org
Wed Oct 15 17:48:02 UTC 2025
On Wed, 15 Oct 2025 15:50:46 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
>> 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.
I noticed we can have conflicts for `void foo_variadic(int x1, ...);` too, I will update the PR to handle this
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/292#discussion_r2433465511
More information about the jextract-dev
mailing list