During overload resolution diagnostics, sort non-viable candidates by the quality of their
conversions.  To make this work, fill out all conversions for all candidates
(but only when diagnosing overload failure).  Split out a few cases from
ovl_fail_bad_conversion which didn't actually involve a failed argument
conversion.

I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94283 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.h b/lib/Sema/SemaOverload.h
index 20add00..f8353e3 100644
--- a/lib/Sema/SemaOverload.h
+++ b/lib/Sema/SemaOverload.h
@@ -390,7 +390,16 @@
     ovl_fail_too_many_arguments,
     ovl_fail_too_few_arguments,
     ovl_fail_bad_conversion,
-    ovl_fail_bad_deduction
+    ovl_fail_bad_deduction,
+
+    /// This conversion candidate was not considered because it
+    /// duplicates the work of a trivial or derived-to-base
+    /// conversion.
+    ovl_fail_trivial_conversion,
+
+    /// This conversion candidate is not viable because its result
+    /// type is not implicitly convertible to the desired type.
+    ovl_fail_bad_final_conversion
   };
 
   /// OverloadCandidate - A single candidate in an overload set (C++ 13.3).