And yet another call.

llvm-svn: 94824
This commit is contained in:
Anders Carlsson 2010-01-29 18:43:53 +00:00
parent a68e51e3a1
commit 7c5fe48060
1 changed files with 8 additions and 2 deletions

View File

@ -6318,8 +6318,14 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object,
Arg = Args[i];
// Pass the argument.
QualType ProtoArgType = Proto->getArgType(i);
IsError |= PerformCopyInitialization(Arg, ProtoArgType, AA_Passing);
OwningExprResult InputInit
= PerformCopyInitialization(InitializedEntity::InitializeParameter(
Method->getParamDecl(i)),
SourceLocation(), Owned(Arg));
IsError |= InputInit.isInvalid();
Arg = InputInit.takeAs<Expr>();
} else {
OwningExprResult DefArg
= BuildCXXDefaultArgExpr(LParenLoc, Method, Method->getParamDecl(i));