Skip to content

Add clang_getEnumConstantDeclUnsignedValue high-level wrapper#33

Merged
edsko merged 1 commit into
mainfrom
bolt12/unsigned-enum-value
Feb 20, 2026
Merged

Add clang_getEnumConstantDeclUnsignedValue high-level wrapper#33
edsko merged 1 commit into
mainfrom
bolt12/unsigned-enum-value

Conversation

@bolt12

@bolt12 bolt12 commented Feb 19, 2026

Copy link
Copy Markdown
Collaborator

This is needed to solve issue well-typed/hs-bindgen#1738. PR well-typed/hs-bindgen#1742 depends on this to be merged.

Wraps wrap_getEnumConstantDeclUnsignedValue (which already existed as a
low-level FFI binding) with the same cursor-kind-checking pattern used
by clang_getEnumConstantDeclValue.

This function should be used when the enum's underlying type is unsigned,
to avoid misinterpreting high bit values (e.g. 128 in a uint8_t enum)
as negative numbers.
@bolt12 bolt12 self-assigned this Feb 19, 2026
@edsko
edsko added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 505ffa9 Feb 20, 2026
7 checks passed
@edsko
edsko deleted the bolt12/unsigned-enum-value branch February 20, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants