aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/overload-call.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/overload-call.cpp')
-rw-r--r--test/SemaCXX/overload-call.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp
index 7eaf98b601c1..3a01bf24b31a 100644
--- a/test/SemaCXX/overload-call.cpp
+++ b/test/SemaCXX/overload-call.cpp
@@ -647,3 +647,14 @@ namespace PR20218 {
g(y); // expected-error {{ambiguous}}
}
}
+
+namespace StringLiteralToCharAmbiguity {
+ void f(char *, int);
+ void f(const char *, unsigned);
+ void g() { f("foo", 0); }
+#if __cplusplus <= 199711L
+ // expected-error@-2 {{call to 'f' is ambiguous}}
+ // expected-note@-5 {{candidate function}}
+ // expected-note@-5 {{candidate function}}
+#endif
+}