File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 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
55typedef int (* T1 )[2 ];
66restrict T1 t1 ;
@@ -15,11 +15,7 @@ restrict T3 t3; // pedantic-warning {{'restrict' qualifier on an array o
1515
1616typedef int (* t4 )(); // pedantic-warning {{a function declaration without a prototype is deprecated in all versions of C}}
1717typedef 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
2220typedef 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)}}
You can’t perform that action at this time.
0 commit comments