An identity conversion is better than any non-identity
conversion. Fixes PR7095.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104476 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp
index 79c74ce..9618ea2 100644
--- a/test/SemaCXX/overload-call.cpp
+++ b/test/SemaCXX/overload-call.cpp
@@ -430,3 +430,17 @@
 
   void g() { f(""); } // expected-error{{volatile lvalue reference to type 'bool const volatile' cannot bind to a value of unrelated type 'char const [1]'}}
 }
+
+namespace PR7095 {
+  struct X { };
+
+  struct Y {
+    operator const X*();
+
+  private:
+    operator X*();
+  };
+
+  void f(const X *);
+  void g(Y y) { f(y); }
+}