aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/complex-overload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/complex-overload.cpp')
-rw-r--r--test/SemaCXX/complex-overload.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/SemaCXX/complex-overload.cpp b/test/SemaCXX/complex-overload.cpp
index 719a850dbf77..1381968751af 100644
--- a/test/SemaCXX/complex-overload.cpp
+++ b/test/SemaCXX/complex-overload.cpp
@@ -42,9 +42,15 @@ void test_promote_or_convert2(float _Complex fc) {
int *cp = promote_or_convert2(fc);
}
-char *promote_or_convert3(int _Complex);
-int *promote_or_convert3(long _Complex);
+char *promote_or_convert3(int _Complex); // expected-note {{candidate}}
+int *promote_or_convert3(long _Complex); // expected-note {{candidate}}
void test_promote_or_convert3(short _Complex sc) {
- char *cp = promote_or_convert3(sc);
+ char *cp1 = promote_or_convert3(sc);
+ char *cp2 = promote_or_convert3(1i);
+ int *cp3 = promote_or_convert3(1il);
+ int *cp4 = promote_or_convert3(1ill); // expected-error {{ambiguous}}
}
+
+char &convert4(short _Complex);
+char &test_convert4 = convert4(1i);