Skip to content

Commit 98fd224

Browse files
committed
Fix up tests
1 parent cdd2d52 commit 98fd224

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

clang/test/C/C23/n3030.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ static_assert(a == 1);
6060
static_assert(b == 1);
6161

6262
void f1(enum a : long b); // expected-error {{non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators?}}
63+
// expected-warning@-1 {{declaration of 'enum a' will not be visible outside of this function}}
6364
void f2(enum c : long{x} d);
6465
enum e : int f3(); // expected-error {{non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators?}}
6566

clang/test/C/drs/dr1xx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ void dr102(void) {
102102
* Formal parameters of incomplete type
103103
*/
104104
void dr103_1(int arg[]); /* ok, not an incomplete type due to rewrite */
105-
void dr103_2(struct S s) {} /* untilc23-warning {{declaration of 'struct S' will not be visible outside of this function}}
105+
void dr103_2(struct S s) {} /* expected-warning {{declaration of 'struct S' will not be visible outside of this function}}
106106
expected-error {{variable has incomplete type 'struct S'}}
107107
expected-note {{forward declaration of 'struct S'}} */
108-
void dr103_3(struct S s); /* untilc23-warning {{declaration of 'struct S' will not be visible outside of this function}}
108+
void dr103_3(struct S s); /* expected-warning {{declaration of 'struct S' will not be visible outside of this function}}
109109
expected-note {{previous declaration is here}} */
110110
void dr103_3(struct S { int a; } s) { } /* untilc23-warning {{declaration of 'struct S' will not be visible outside of this function}}
111111
expected-error {{conflicting types for 'dr103_3'}} */
112-
void dr103_4(struct S s1, struct S { int a; } s2); /* untilc23-warning {{declaration of 'struct S' will not be visible outside of this function}} */
112+
void dr103_4(struct S s1, struct S { int a; } s2); /* expected-warning {{declaration of 'struct S' will not be visible outside of this function}} */
113113

114114
/* WG14 DR105: dup 017
115115
* Precedence of requirements on compatible types

clang/test/Sema/enum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void PR8694(int* e) // expected-note {{passing argument to parameter 'e' here}}
108108
{
109109
}
110110

111-
void crash(enum E *e) // pre-c23-warning {{declaration of 'enum E' will not be visible outside of this function}} \
111+
void crash(enum E *e) // expected-warning {{declaration of 'enum E' will not be visible outside of this function}} \
112112
// expected-warning {{ISO C forbids forward references to 'enum' types}}
113113
{
114114
PR8694(e); // expected-warning {{incompatible pointer types passing 'enum E *' to parameter of type 'int *'}}

0 commit comments

Comments
 (0)