aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-01-29 18:43:53 +0000
committerAnders Carlsson <andersca@mac.com>2010-01-29 18:43:53 +0000
commit3faa486935d4c57e89edf2f1883c4ba715a1b2ec (patch)
tree877b9fea64d28d4a941d1bffa261751b40e19c63 /lib/Sema/SemaOverload.cpp
parent38f88abead110a514ae626818c7d09a1ec763058 (diff)
And yet another call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 361bc865d7..24cad2a9c5 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -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));