Skip to content

Commit 939f6d5

Browse files
committed
Update test/Sema/attr-counted-by.c
1 parent 863375d commit 939f6d5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/test/Sema/attr-counted-by.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,27 @@ struct not_found_count_in_other_unnamed_substruct {
4343

4444
struct {
4545
int dummy;
46-
int array[] __counted_by(count); // expected-error {{'counted_by' field 'count' isn't within the same struct as the flexible array}}
46+
int array[] __counted_by(count); // expected-error {{use of undeclared identifier 'count'}}
4747
};
4848
};
4949

5050
struct not_found_count_in_other_substruct {
5151
struct _a1 {
52-
unsigned char count; // expected-note {{'count' declared here}}
52+
unsigned char count;
5353
} a1;
5454

5555
struct {
5656
int dummy;
57-
int array[] __counted_by(count); // expected-error {{'counted_by' field 'count' isn't within the same struct as the flexible array}}
57+
int array[] __counted_by(count); // expected-error {{use of undeclared identifier 'count'}}
5858
};
5959
};
6060

6161
struct not_found_count_in_other_substruct_2 {
62-
struct _a1 {
63-
unsigned char count; // expected-note {{'count' declared here}}
64-
} a1;
62+
struct _a2 {
63+
unsigned char count;
64+
} a2;
6565

66-
int array[] __counted_by(count); // expected-error {{'counted_by' field 'count' isn't within the same struct as the flexible array}}
66+
int array[] __counted_by(count); // expected-error {{use of undeclared identifier 'count'}}
6767
};
6868

6969
struct not_found_suggest {

0 commit comments

Comments
 (0)