Skip to content

Commit be3a509

Browse files
committed
Fix isCopyConstructor conversion rank bug
1 parent cdc8f5d commit be3a509

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Sema/SemaOverload.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,8 +1650,7 @@ TryUserDefinedConversion(Sema &S, Expr *From, QualType ToType,
16501650
S.Context.getCanonicalType(FromType.getUnqualifiedType());
16511651
QualType ToCanon
16521652
= S.Context.getCanonicalType(ToType).getUnqualifiedType();
1653-
if (Constructor->isCopyConstructor() &&
1654-
(FromCanon == ToCanon ||
1653+
if ((FromCanon == ToCanon ||
16551654
S.IsDerivedFrom(FromLoc, FromCanon, ToCanon))) {
16561655
// Turn this into a "standard" conversion sequence, so that it
16571656
// gets ranked with standard conversion sequences.

0 commit comments

Comments
 (0)