[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / FixIt / fixit-errors.c
bloba4dd263e0ad88b52d482e10d2a7c59e9fa14b614
1 // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
2 // RUN: cp %s %t
3 // RUN: not %clang_cc1 -pedantic -fixit -x c %t
4 // RUN: %clang_cc1 -pedantic -Werror -Wno-invalid-noreturn -x c %t
6 /* This is a test of the various code modification hints that are
7 provided as part of warning or extension diagnostics. All of the
8 warnings will be fixed by -fixit, and the resulting file should
9 compile cleanly with -Werror -pedantic. */
11 struct s; // expected-note{{previous use is here}}
13 union s *s1; // expected-error{{use of 's' with tag type that does not match previous declaration}}
15 struct Point {
16 float x, y, z;
19 struct Point *get_origin(void);
21 void test_point(void) {
22 (void)get_origin->x; // expected-error {{base of member reference is a function; perhaps you meant to call it with no arguments?}}
25 // These errors require C11.
26 #if __STDC_VERSION__ > 199901L
27 void noreturn_1(void) _Noreturn; // expected-error {{must precede function declarator}}
28 void noreturn_1(void) {
29 return; // expected-warning {{should not return}}
31 void noreturn_2(void) _Noreturn { // expected-error {{must precede function declarator}}
32 return; // expected-warning {{should not return}}
34 #endif