RFR: Use regex match when looking for unnamed struct/union/enum in doc comment
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Jan 22 17:04:54 UTC 2024
On Mon, 22 Jan 2024 12:43:32 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> Noticed this small issue when running the samples. We try to look for an anonymous struct in the doc comments we generate. Clang will put the file path of the file containing the struct in the declaration string, which causes all kinds of problems, so we filter it out. A regular expression is used for this, however, it is passed to `String::contains`, which doesn't accept a regex. Switch to `String::matches` so it works.
>
> - I've added a new test case to TestDocComments
> - I've also renamed the enclosing folder of this test, since it still had the bug id as a name (while the test itself doesn't)
> - I also noticed an issue in the TestGlobalStructAccess test. We access a global variable with a struct type, but this variable is not marked as exported, so the test fails on Windows.
Thanks for fixing
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR Review: https://git.openjdk.org/jextract/pull/190#pullrequestreview-1836945832
More information about the jextract-dev
mailing list