Implement ranking of standard conversion sequences by their qualification
conversions (e.g., comparing int* -> const int* against 
int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3.

Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of
IsQualificationConversion and CompareQualificationConversion (and fix
the handling of the int* -> volatile int* conversion in the former).
 

llvm-svn: 57978
diff --git a/clang/lib/Sema/SemaOverload.h b/clang/lib/Sema/SemaOverload.h
index 8d7ccd2..f9e03ae 100644
--- a/clang/lib/Sema/SemaOverload.h
+++ b/clang/lib/Sema/SemaOverload.h
@@ -170,9 +170,9 @@
     // sequences. Use Sema::CompareImplicitConversionSequences to
     // actually perform the comparison.
     enum CompareKind {
-      Better,
-      Indistinguishable,
-      Worse
+      Better = -1,
+      Indistinguishable = 0,
+      Worse = 1
     };
 
     void DebugPrint() const;