RFR: 7903573: Jextract does not support atomic types

Jorn Vernee jvernee at openjdk.org
Fri Oct 20 17:24:09 UTC 2023


On Fri, 20 Oct 2023 13:17:23 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This PR fixes a crash when jextract processes atomic types. These types are exposed in libclang in a weird way: their kind is set to `Atomic` but they do not reveal what the underlying type is (except for the type spelling). The underlying type has to be discovered using the `clang_Type_getValueType` function on the `Atomic` type.
> 
> This PR does just that, and also adds a test for various atomic types.

Marked as reviewed by jvernee (Committer).

test/testng/org/openjdk/jextract/test/api/TestAtomic.java line 2:

> 1: /*
> 2:  * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.

Wrong year
Suggestion:

 * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.

test/testng/org/openjdk/jextract/test/api/atomic.h line 1:

> 1: #include <stdatomic.h>

Missing header

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

PR Review: https://git.openjdk.org/jextract/pull/132#pullrequestreview-1690590993
PR Review Comment: https://git.openjdk.org/jextract/pull/132#discussion_r1366971456
PR Review Comment: https://git.openjdk.org/jextract/pull/132#discussion_r1366971269


More information about the jextract-dev mailing list