Integrated: Use regex match when looking for unnamed struct/union/enum in doc comment
Jorn Vernee
jvernee at openjdk.org
Mon Jan 22 17:30:56 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.
This pull request has now been integrated.
Changeset: d9686723
Author: Jorn Vernee <jvernee at openjdk.org>
URL: https://git.openjdk.org/jextract/commit/d9686723559577381e836b81d2b1b9cdc6ac8f45
Stats: 31 lines in 11 files changed: 27 ins; 0 del; 4 mod
Use regex match when looking for unnamed struct/union/enum in doc comment
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/jextract/pull/190
More information about the jextract-dev
mailing list