[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / initialize-noreturn.c
blob4e0d845b9b4e5128a44ffeb7567a68cc7606cf1d
1 // RUN: %clang_cc1 %s -fsyntax-only -Wno-strict-prototypes -verify
2 // rdar://10095762
4 typedef void (*Fn_noret)(void) __attribute__((noreturn));
5 typedef void (*Fn_ret)(void);
7 typedef void (*Fn_noret_noproto)() __attribute__((noreturn));
8 typedef void (*Fn_ret_noproto)();
10 void foo(void);
11 void foo_noret(void) __attribute__((noreturn));
13 void foo_noproto();
14 void foo_noret_noproto() __attribute__((noreturn));
16 void test() {
17 Fn_noret fn2 = &foo; // expected-warning {{incompatible function pointer types initializing 'Fn_noret'}}
18 Fn_noret fn3 = &foo_noret;
19 Fn_ret fn4 = &foo_noret;
20 Fn_ret fn5 = &foo;
22 Fn_noret_noproto fn6 = &foo_noproto; // expected-warning {{incompatible function pointer types initializing 'Fn_noret_noproto'}}
23 Fn_noret_noproto fn7 = &foo_noret_noproto;
24 Fn_ret_noproto fn8 = &foo_noret_noproto;
25 Fn_ret_noproto fn9 = &foo_noproto;