forked from OSchip/llvm-project
Another PerformCopyInitialization call bites the dust.
llvm-svn: 94823
This commit is contained in:
parent
aedd6f5b33
commit
a68e51e3a1
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue