[PATCH] D40016: Use ImplicitConversionSequence::setAsIdentityConversion(QualType). NFC
Alexander Richardson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 13 03:01:59 PST 2018
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40016.173828.patch
Type: text/x-patch
Size: 1551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181113/5e7f1352/attachment.bin>
More information about the cfe-commits
mailing list