зеркало из https://github.com/microsoft/clang-1.git
Don't build an explicit conversion to a reference type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89441 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
e36c9abd38
Коммит
e44201a284
|
@ -1156,11 +1156,12 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
|
|||
dyn_cast<CXXConstructorDecl>(FD)) {
|
||||
CastKind = CastExpr::CK_ConstructorConversion;
|
||||
// Do no conversion if dealing with ... for the first conversion.
|
||||
if (!ICS.UserDefined.EllipsisConversion)
|
||||
if (!ICS.UserDefined.EllipsisConversion) {
|
||||
// If the user-defined conversion is specified by a constructor, the
|
||||
// initial standard conversion sequence converts the source type to the
|
||||
// type required by the argument of the constructor
|
||||
BeforeToType = Ctor->getParamDecl(0)->getType();
|
||||
BeforeToType = Ctor->getParamDecl(0)->getType().getNonReferenceType();
|
||||
}
|
||||
}
|
||||
else
|
||||
assert(0 && "Unknown conversion function kind!");
|
||||
|
|
Загрузка…
Ссылка в новой задаче