[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / overloadable-complex.c
blobefdeb8ff37a3171029ab000b333bd94a8548877a
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 char *foo(float) __attribute__((__overloadable__));
4 void test_foo_1(float fv, double dv, float _Complex fc, double _Complex dc) {
5 char *cp1 = foo(fv);
6 char *cp2 = foo(dv);
7 // Note: GCC and EDG reject these two, but they are valid C99 conversions
8 char *cp3 = foo(fc);
9 char *cp4 = foo(dc);
12 int *foo(float _Complex) __attribute__((__overloadable__));
14 void test_foo_2(float fv, double dv, float _Complex fc, double _Complex dc) {
15 char *cp1 = foo(fv);
16 char *cp2 = foo(dv);
17 int *ip = foo(fc);
18 int *lp = foo(dc);
21 long *foo(double _Complex) __attribute__((__overloadable__));
23 void test_foo_3(float fv, double dv, float _Complex fc, double _Complex dc) {
24 char *cp1 = foo(fv);
25 char *cp2 = foo(dv);
26 int *ip = foo(fc);
27 long *lp = foo(dc);
30 char *promote_or_convert(double _Complex) __attribute__((__overloadable__)); // expected-note 2 {{candidate function}}
31 int *promote_or_convert(long double _Complex) __attribute__((__overloadable__)); // expected-note 2 {{candidate function}}
33 void test_promote_or_convert(float f, float _Complex fc) {
34 char *cp = promote_or_convert(fc); // expected-error{{call to 'promote_or_convert' is ambiguous}}
35 int *ip2 = promote_or_convert(f); // expected-error{{call to 'promote_or_convert' is ambiguous}}
38 char *promote_or_convert2(float) __attribute__((__overloadable__));
39 int *promote_or_convert2(double _Complex) __attribute__((__overloadable__));
41 void test_promote_or_convert2(float _Complex fc) {
42 int *cp = promote_or_convert2(fc);
45 char *promote_or_convert3(int _Complex) __attribute__((__overloadable__));
46 int *promote_or_convert3(long _Complex) __attribute__((__overloadable__));
48 void test_promote_or_convert3(short _Complex sc) {
49 char *cp = promote_or_convert3(sc);