Skip to content

[BoundsSafety] Fix flexible-array-member-shared-decls-O2.c tests (NFC) #10864

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

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

patrykstefanski
Copy link

The tests started failing after
20e8de9.

This removes redundant checks (in the tests) that ensure that the available count from flex base pointer is at least the assigned count. In the tests, the flex base pointer is of type
__sized_by(sizeof(struct Outer) + sizeof(int) * len), while the assigned count is len, which makes the check basically len >= len.

rdar://153685860

The tests started failing after
20e8de9.

This removes redundant checks (in the tests) that ensure that the
available count from flex base pointer is at least the assigned count.
In the tests, the flex base pointer is of type
`__sized_by(sizeof(struct Outer) + sizeof(int) * len)`, while the
assigned count is `len`, which makes the check basically `len >= len`.

rdar://153685860
@patrykstefanski patrykstefanski added the clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang label Jun 17, 2025
@patrykstefanski
Copy link
Author

@swift-ci test llvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:bounds-safety Issue relating to the experimental -fbounds-safety feature in Clang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant