arichardson updated this revision to Diff 173828. arichardson added a comment.
rebased on latest HEAD Repository: rC Clang https://reviews.llvm.org/D40016 Files: lib/Sema/SemaOverload.cpp Index: lib/Sema/SemaOverload.cpp =================================================================== --- lib/Sema/SemaOverload.cpp +++ lib/Sema/SemaOverload.cpp @@ -4780,10 +4780,7 @@ InitializedEntity::InitializeParameter(S.Context, ToType, /*Consumed=*/false); if (S.CanPerformCopyInitialization(Entity, From)) { - Result.setStandard(); - Result.Standard.setAsIdentityConversion(); - Result.Standard.setFromType(ToType); - Result.Standard.setAllToTypes(ToType); + Result.setAsIdentityConversion(ToType); return Result; } } @@ -4832,10 +4829,7 @@ // For an empty list, we won't have computed any conversion sequence. // Introduce the identity conversion sequence. if (From->getNumInits() == 0) { - Result.setStandard(); - Result.Standard.setAsIdentityConversion(); - Result.Standard.setFromType(ToType); - Result.Standard.setAllToTypes(ToType); + Result.setAsIdentityConversion(ToType); } Result.setStdInitializerListElement(toStdInitializerList); @@ -4973,10 +4967,7 @@ // - if the initializer list has no elements, the implicit conversion // sequence is the identity conversion. else if (NumInits == 0) { - Result.setStandard(); - Result.Standard.setAsIdentityConversion(); - Result.Standard.setFromType(ToType); - Result.Standard.setAllToTypes(ToType); + Result.setAsIdentityConversion(ToType); } return Result; }
Index: lib/Sema/SemaOverload.cpp =================================================================== --- lib/Sema/SemaOverload.cpp +++ lib/Sema/SemaOverload.cpp @@ -4780,10 +4780,7 @@ InitializedEntity::InitializeParameter(S.Context, ToType, /*Consumed=*/false); if (S.CanPerformCopyInitialization(Entity, From)) { - Result.setStandard(); - Result.Standard.setAsIdentityConversion(); - Result.Standard.setFromType(ToType); - Result.Standard.setAllToTypes(ToType); + Result.setAsIdentityConversion(ToType); return Result; } } @@ -4832,10 +4829,7 @@ // For an empty list, we won't have computed any conversion sequence. // Introduce the identity conversion sequence. if (From->getNumInits() == 0) { - Result.setStandard(); - Result.Standard.setAsIdentityConversion(); - Result.Standard.setFromType(ToType); - Result.Standard.setAllToTypes(ToType); + Result.setAsIdentityConversion(ToType); } Result.setStdInitializerListElement(toStdInitializerList); @@ -4973,10 +4967,7 @@ // - if the initializer list has no elements, the implicit conversion // sequence is the identity conversion. else if (NumInits == 0) { - Result.setStandard(); - Result.Standard.setAsIdentityConversion(); - Result.Standard.setFromType(ToType); - Result.Standard.setAllToTypes(ToType); + Result.setAsIdentityConversion(ToType); } return Result; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits