RFR: 7903610: Missing handling for array fields with inline struct declaration

Jorn Vernee jvernee at openjdk.org
Thu Dec 14 12:47:17 UTC 2023


On Thu, 14 Dec 2023 12:30:58 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This patch adds a new method in `Utils` which helps visitors to obtain a scoped declaration given a type. This is used whenever the visitor logic needs to recurse on a declared type e.g. in a variable, or a typedef. The current logic only tests for `Type.Declared` and, in doing so, misses some cases, such as arrays and typedefs which point back to a declared type.

Marked as reviewed by jvernee (Committer).

test/jtreg/generator/nestedTypes/TestNestedTypes.java line 37:

> 35:  * @test id=classes
> 36:  * @library /lib
> 37:  * @run main/othervm JtregJextract -l Func -t test.jextract.nestedtypes nested_types.h

I don't think `-l Func` is needed here?

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

PR Review: https://git.openjdk.org/jextract/pull/161#pullrequestreview-1781731700
PR Review Comment: https://git.openjdk.org/jextract/pull/161#discussion_r1426668838


More information about the jextract-dev mailing list