Catch more uses of uninitialized implicit conversion sequences.
When diagnosing bad conversions, skip the conversion for ignored object
arguments. Fixes PR 6398.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97090 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp
index e2a4fd8..21b5da2 100644
--- a/test/SemaCXX/overload-call.cpp
+++ b/test/SemaCXX/overload-call.cpp
@@ -359,3 +359,16 @@
int &ir = f(b);
}
}
+
+// PR 6398
+namespace test4 {
+ class A;
+ class B {
+ static void foo(); // expected-note {{not viable}}
+ static void foo(int*); // expected-note {{not viable}}
+
+ void bar(A *a) {
+ foo(a); // expected-error {{no matching function for call}}
+ }
+ };
+}