Create CXXConstructExpr calls for arguments passed to functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72102 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anders Carlsson 2009-05-19 04:45:15 +00:00
Родитель ac8d6298a8
Коммит 7c3e8a1ddb
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -854,9 +854,13 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
QualType FromType = From->getType();
if (SCS.CopyConstructor) {
// FIXME: Create a temporary object by calling the copy constructor.
ImpCastExprToType(From, ToType.getNonReferenceType(),
ToType->isLValueReferenceType());
// FIXME: When can ToType be a reference type?
assert(!ToType->isReferenceType());
CXXTempVarDecl *Temp = CXXTempVarDecl::Create(Context, CurContext, ToType);
// FIXME: Keep track of whether the copy constructor is elidable or not.
From = CXXConstructExpr::Create(Context, Temp, ToType,
SCS.CopyConstructor, false, &From, 1);
return false;
}