Another PerformCopyInitialization call bites the dust.

llvm-svn: 94823
This commit is contained in:
Anders Carlsson 2010-01-29 18:37:50 +00:00
parent aedd6f5b33
commit a68e51e3a1
1 changed files with 12 additions and 4 deletions

View File

@ -5878,12 +5878,20 @@ Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
// Convert the arguments. // Convert the arguments.
CXXMethodDecl *Method = cast<CXXMethodDecl>(FnDecl); CXXMethodDecl *Method = cast<CXXMethodDecl>(FnDecl);
if (PerformObjectArgumentInitialization(Args[0], Method) || if (PerformObjectArgumentInitialization(Args[0], Method))
PerformCopyInitialization(Args[1],
FnDecl->getParamDecl(0)->getType(),
AA_Passing))
return ExprError(); return ExprError();
// Convert the arguments.
OwningExprResult InputInit
= PerformCopyInitialization(InitializedEntity::InitializeParameter(
FnDecl->getParamDecl(0)),
SourceLocation(),
Owned(Args[1]));
if (InputInit.isInvalid())
return ExprError();
Args[1] = InputInit.takeAs<Expr>();
// Determine the result type // Determine the result type
QualType ResultTy QualType ResultTy
= FnDecl->getType()->getAs<FunctionType>()->getResultType(); = FnDecl->getType()->getAs<FunctionType>()->getResultType();