Skip to content

[BoundsSafety] Fix Sema/compound-literal-ended_by.c test #10702

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

Merged
merged 1 commit into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ struct eb_with_other_data field_initializers_with_side_effects(struct eb_with_ot

struct eb_with_other_data global_eb_with_other_data_side_effect_init =
(struct eb_with_other_data) {
// FIXME: Location of first non-constant is wrong (rdar://81135826)
.start = 0x0, // both-error{{initializer element is not a compile-time constant}}
.start = 0x0,
.end = 0x0,
.other = side_effect()
.other = side_effect() // both-error{{initializer element is not a compile-time constant}}
};

struct eb_with_other_data side_effects_in_ptrs(struct eb_with_other_data* s) {
Expand Down
5 changes: 2 additions & 3 deletions clang/test/BoundsSafety/Sema/compound-literal-ended_by.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,9 @@ struct eb_with_other_data field_initializers_with_side_effects(struct eb_with_ot

struct eb_with_other_data global_eb_with_other_data_side_effect_init =
(struct eb_with_other_data) {
// FIXME: Location of first non-constant is wrong (rdar://81135826)
.start = 0x0, // both-error{{initializer element is not a compile-time constant}}
.start = 0x0,
.end = 0x0,
.other = side_effect()
.other = side_effect() // both-error{{initializer element is not a compile-time constant}}
};

struct eb_with_other_data side_effects_in_ptrs(struct eb_with_other_data* s) {
Expand Down