[foreign-jextract] RFR: 8264825: update libclang bindings after recent jextract changes

Jorn Vernee jvernee at openjdk.java.net
Wed Apr 7 12:08:54 UTC 2021


On Wed, 7 Apr 2021 11:31:49 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

> * Fixed redundant cast generation (which leads to build warnings after libclang is regenerated)
> * libclang binding regenerated and calling code adjusted.
> * All tests and samples pass

src/jdk.incubator.jextract/share/classes/jdk/internal/clang/Diagnostic.java line 77:

> 75:     public SourceLocation location() {
> 76:         try (ResourceScope scope = ResourceScope.newConfinedScope()) {
> 77:             return new SourceLocation(Index_h.clang_getDiagnosticLocation(scope, ptr));

SourceLocation holds a reference to the segment, but this closes the scope after this call. Looks like this should use an implicit scope instead.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/491


More information about the panama-dev mailing list