Produce detailed diagnostics when overload
resolution failed to select a candidate due to
ambiguity in type conversion function selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82596 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/ambig-user-defined-convesions.cpp b/test/SemaCXX/ambig-user-defined-convesions.cpp
index d391a04..1117253 100644
--- a/test/SemaCXX/ambig-user-defined-convesions.cpp
+++ b/test/SemaCXX/ambig-user-defined-convesions.cpp
@@ -1,10 +1,10 @@
 // RUN: clang-cc -fsyntax-only -verify %s
 
 struct BASE { 
-  operator int &(); // expected-note {{candidate function}}
+  operator int &(); // expected-note 4 {{candidate function}}
 }; 
 struct BASE1 { 
-  operator int &(); // expected-note {{candidate function}}
+  operator int &(); // expected-note 4 {{candidate function}}
 }; 
 
 struct B : public BASE, BASE1 { 
@@ -13,7 +13,14 @@
 
 extern B f(); 
 
+B b1;
+void func(const int ci, const char cc); // expected-note {{function not viable because of ambiguity in conversion of argument 1}}
+void func(const char ci, const B b); // expected-note {{function not viable because of ambiguity in conversion of argument 1}}
+void func(const B b, const int ci); // expected-note {{function not viable because of ambiguity in conversion of argument 2}}
+
+
 const int main() {
+  func(b1, f()); // expected-error {{no matching function for call to 'func'}}
   return f(); // expected-error {{conversion from 'struct B' to 'int const' is ambiguous}}
 }