[foreign-jextract] RFR: 8267305: regenerate clang jextract binding
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Tue May 18 10:11:48 UTC 2021
On Tue, 18 May 2021 09:39:56 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
> clang.symbols file to list the symbols used.
Looks really good and much more compact than what we had before!
I left some minor code comments on code not autogenerated.
src/jdk.incubator.jextract/share/classes/jdk/internal/clang/Index.java line 87:
> 85: public TranslationUnit parseTU(String file, Consumer<Diagnostic> dh, int options, String... args)
> 86: throws ParsingFailedException {
> 87: try (ResourceScope scope = ResourceScope.newConfinedScope()) {
Watch out for indentation in this method - e.g. the `throws` clause seems odd on the new line. Also, there are missing spaces before/after the conditional operator `?`
src/jdk.incubator.jextract/share/classes/jdk/internal/clang/TranslationUnit.java line 85:
> 83: }
> 84:
> 85: static long FILENAME_OFFSET = CXUnsavedFile.$LAYOUT().bitOffset(MemoryLayout.PathElement.groupElement("Filename")) / 8;
can we use byteOffset instead of bitOffset / 8
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/538
More information about the panama-dev
mailing list