When comparing two method overload candidates during overload diagnostics,
skip the object argument conversion if either of the candidates didn't
initialize it.
Fixes PR6421, which is such a very straightforward extension of PR6398 that I
should have worked it into the last test case (and therefore caught it then).
Ah well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97135 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp
index 21b5da2..38a26d3 100644
--- a/test/SemaCXX/overload-call.cpp
+++ b/test/SemaCXX/overload-call.cpp
@@ -360,12 +360,13 @@
}
}
-// PR 6398
+// PR 6398 + PR 6421
namespace test4 {
class A;
class B {
static void foo(); // expected-note {{not viable}}
static void foo(int*); // expected-note {{not viable}}
+ static void foo(long*); // expected-note {{not viable}}
void bar(A *a) {
foo(a); // expected-error {{no matching function for call}}