Skip to content

Commit 88b2b07

Browse files
committed
cleanup duplicate error messages
1 parent 1bd2f01 commit 88b2b07

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s
2-
// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic %s
3-
// RUN: %clang_cc1 -std=c2x -fsyntax-only -Wpre-c2x-compat -verify=c2x-compat %s
2+
// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic,expected %s
3+
// RUN: %clang_cc1 -std=c2x -fsyntax-only -Wpre-c2x-compat -verify=c2x-compat,expected %s
44

55
typedef int (*T1)[2];
66
restrict T1 t1;
@@ -15,11 +15,7 @@ restrict T3 t3; // pedantic-warning {{'restrict' qualifier on an array o
1515

1616
typedef int (*t4)(); // pedantic-warning {{a function declaration without a prototype is deprecated in all versions of C}}
1717
typedef t4 t5[2];
18-
typedef t5 restrict t6; // expected-error {{pointer to function type 'int (void)' may not be 'restrict' qualified}} \
19-
// pedantic-error {{pointer to function type 'int ()' may not be 'restrict' qualified}} \
20-
// c2x-compat-error {{pointer to function type 'int (void)' may not be 'restrict' qualified}}
18+
typedef t5 restrict t6; // // expected-error-re {{pointer to function type 'int {{\((void)?\)}}' may not be 'restrict' qualified}}
2119

2220
typedef int t7[2];
23-
typedef t7 restrict t8; // expected-error {{restrict requires a pointer or reference ('t7' (aka 'int[2]') is invalid)}} \
24-
// pedantic-error {{restrict requires a pointer or reference ('t7' (aka 'int[2]') is invalid)}} \
25-
// c2x-compat-error {{restrict requires a pointer or reference ('t7' (aka 'int[2]') is invalid}}
21+
typedef t7 restrict t8; // expected-error {{restrict requires a pointer or reference ('t7' (aka 'int[2]') is invalid)}}

0 commit comments

Comments
 (0)