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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57978 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.h b/lib/Sema/SemaOverload.h
index 8d7ccd2..f9e03ae 100644
--- a/lib/Sema/SemaOverload.h
+++ b/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;