Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit AssociatedEnum attribute to input parameters #2797

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

kennykerr
Copy link
Collaborator

The AssociatedEnum attribute is only supported on input parameters because it is very problematic in general. This update just ensures that metadata that applies it to output parameters doesn't produce invalid code gen.

Fixes: #2771

@riverar
Copy link
Collaborator

riverar commented Jan 16, 2024

Side note: We can look at supporting AssociatedEnum on output/pointers at the time we ingest newer metadata with those changes.

@kennykerr kennykerr merged commit 6b1c3ff into master Jan 16, 2024
65 checks passed
@kennykerr kennykerr deleted the param_or_enum_not_out branch January 16, 2024 18:59
@MarijnS95
Copy link
Contributor

Unfortunately, as reported in #2771 (comment) this only seems to make things worse. Raw by-value parameters with an [In,AssociatedEnun] annotations are suddenly being treated as pointers, which is the wrong ABI.

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.

Support [AssociatedEnum] on UINT* pointer ([Out]/return) types
3 participants