aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 8e765485b1..551f61a56e 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -39,6 +39,7 @@ GetConversionCategory(ImplicitConversionKind Kind) {
ICC_Conversion,
ICC_Conversion,
ICC_Conversion,
+ ICC_Conversion,
ICC_Conversion
};
return Category[(int)Kind];
@@ -61,6 +62,7 @@ ImplicitConversionRank GetConversionRank(ImplicitConversionKind Kind) {
ICR_Conversion,
ICR_Conversion,
ICR_Conversion,
+ ICR_Conversion,
ICR_Conversion
};
return Rank[(int)Kind];
@@ -82,7 +84,8 @@ const char* GetImplicitConversionName(ImplicitConversionKind Kind) {
"Floating-integral conversion",
"Pointer conversion",
"Pointer-to-member conversion",
- "Boolean conversion"
+ "Boolean conversion",
+ "Derived-to-base conversion"
};
return Name[Kind];
}
@@ -1066,10 +1069,7 @@ Sema::TryCopyInitialization(Expr *From, QualType ToType) {
return ICS;
} else if (ToType->isReferenceType()) {
ImplicitConversionSequence ICS;
- if (CheckReferenceInit(From, ToType, /*Complain=*/false))
- ICS.ConversionKind = ImplicitConversionSequence::BadConversion;
- else
- ICS.ConversionKind = ImplicitConversionSequence::StandardConversion;
+ CheckReferenceInit(From, ToType, &ICS);
return ICS;
} else {
return TryImplicitConversion(From, ToType);