summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/overloadable-complex.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-02-25 07:20:54 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-02-25 07:20:54 +0000
commit8fa1e7eec4d0a75dbe90c76d22562a933f56c1bd (patch)
tree73f77d4ce7e3dd79eaaf375d61dc89429b1f13ad /clang/test/Sema/overloadable-complex.c
parent2fa52b06d00df13e1fa7ab89fbbc6f5e6756c2a7 (diff)
downloadbcm5719-llvm-8fa1e7eec4d0a75dbe90c76d22562a933f56c1bd.tar.gz
bcm5719-llvm-8fa1e7eec4d0a75dbe90c76d22562a933f56c1bd.zip
Add a new conversion rank to classify conversions between complex and scalar
types. Rank these conversions below other conversions. This allows overload resolution when the only distinction is between a complex and scalar type. It also brings the complex overload resolutin in line with GCC's. llvm-svn: 97128
Diffstat (limited to 'clang/test/Sema/overloadable-complex.c')
-rw-r--r--clang/test/Sema/overloadable-complex.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Sema/overloadable-complex.c b/clang/test/Sema/overloadable-complex.c
index e8dbf3a6094..770a9722326 100644
--- a/clang/test/Sema/overloadable-complex.c
+++ b/clang/test/Sema/overloadable-complex.c
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-char *foo(float) __attribute__((__overloadable__)); // expected-note 3 {{candidate function}}
+char *foo(float) __attribute__((__overloadable__));
void test_foo_1(float fv, double dv, float _Complex fc, double _Complex dc) {
char *cp1 = foo(fv);
@@ -9,20 +9,20 @@ void test_foo_1(float fv, double dv, float _Complex fc, double _Complex dc) {
char *cp4 = foo(dc);
}
-int *foo(float _Complex) __attribute__((__overloadable__)); // expected-note 3 {{candidate function}}
+int *foo(float _Complex) __attribute__((__overloadable__));
void test_foo_2(float fv, double dv, float _Complex fc, double _Complex dc) {
char *cp1 = foo(fv);
- char *cp2 = foo(dv); // expected-error{{call to 'foo' is ambiguous; candidates are:}}
+ char *cp2 = foo(dv);
int *ip = foo(fc);
- int *lp = foo(dc); // expected-error{{call to 'foo' is ambiguous; candidates are:}}
+ int *lp = foo(dc);
}
-long *foo(double _Complex) __attribute__((__overloadable__)); // expected-note {{candidate function}}
+long *foo(double _Complex) __attribute__((__overloadable__));
void test_foo_3(float fv, double dv, float _Complex fc, double _Complex dc) {
char *cp1 = foo(fv);
- char *cp2 = foo(dv); // expected-error{{call to 'foo' is ambiguous; candidates are:}}
+ char *cp2 = foo(dv);
int *ip = foo(fc);
long *lp = foo(dc);
}
OpenPOWER on IntegriCloud