[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / fp16-sema.c
blobe403ba69e8267aeafeaff209d755c9e7d9f91336
1 // RUN: %clang_cc1 -fsyntax-only -Wno-strict-prototypes -verify %s
3 // Functions cannot have parameters of type __fp16.
4 extern void f (__fp16); // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
5 extern void g (__fp16 *);
7 extern void (*pf) (__fp16); // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
8 extern void (*pg) (__fp16*);
10 typedef void(*tf) (__fp16); // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
11 typedef void(*tg) (__fp16*);
13 void kf(a)
14 __fp16 a; { // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
17 void kg(a)
18 __fp16 *a; {
21 // Functions cannot return type __fp16.
22 extern __fp16 f1 (void); // expected-error {{function return value cannot have __fp16 type; did you forget * ?}}
23 extern __fp16 *g1 (void);
25 extern __fp16 (*pf1) (void); // expected-error {{function return value cannot have __fp16 type; did you forget * ?}}
26 extern __fp16 *(*gf1) (void);
28 typedef __fp16 (*tf1) (void); // expected-error {{function return value cannot have __fp16 type; did you forget * ?}}
29 typedef __fp16 *(*tg1) (void);
31 void testComplex() {
32 // FIXME: Should these be valid?
33 _Complex __fp16 a; // expected-error {{'_Complex half' is invalid}}
34 __fp16 b;
35 a = __builtin_complex(b, b); // expected-error {{'_Complex half' is invalid}}