1 // RUN: clang-cc -fsyntax-only -verify %s
2 char *foo(float); // expected-note 3 {{candidate function}}
4 void test_foo_1(float fv, double dv, float _Complex fc, double _Complex dc) {
7 // Note: GCC and EDG reject these two, but they are valid C99 conversions
12 int *foo(float _Complex); // expected-note 3 {{candidate function}}
14 void test_foo_2(float fv, double dv, float _Complex fc, double _Complex dc) {
16 char *cp2 = foo(dv); // expected-error{{call to 'foo' is ambiguous; candidates are:}}
18 int *lp = foo(dc); // expected-error{{call to 'foo' is ambiguous; candidates are:}}
21 long *foo(double _Complex); // expected-note {{candidate function}}
23 void test_foo_3(float fv, double dv, float _Complex fc, double _Complex dc) {
25 char *cp2 = foo(dv); // expected-error{{call to 'foo' is ambiguous; candidates are:}}
30 char *promote_or_convert(double _Complex); // expected-note{{candidate function}}
31 int *promote_or_convert(long double _Complex); // expected-note{{candidate function}}
33 void test_promote_or_convert(float f, float _Complex fc) {
34 char *cp = promote_or_convert(fc);
35 int *ip2 = promote_or_convert(f); // expected-error{{call to 'promote_or_convert' is ambiguous; candidates are:}}
38 char *promote_or_convert2(float);
39 int *promote_or_convert2(double _Complex);
41 void test_promote_or_convert2(float _Complex fc) {
42 int *cp = promote_or_convert2(fc);
45 char *promote_or_convert3(int _Complex);
46 int *promote_or_convert3(long _Complex);
48 void test_promote_or_convert3(short _Complex sc) {
49 char *cp = promote_or_convert3(sc);