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.
CXXMethodDecl *Method = cast<CXXMethodDecl>(FnDecl);
if (PerformObjectArgumentInitialization(Args[0], Method) ||
PerformCopyInitialization(Args[1],
FnDecl->getParamDecl(0)->getType(),
AA_Passing))
if (PerformObjectArgumentInitialization(Args[0], Method))
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
QualType ResultTy
= FnDecl->getType()->getAs<FunctionType>()->getResultType();