]> granicus.if.org Git - clang/commitdiff
And yet another call.
authorAnders Carlsson <andersca@mac.com>
Fri, 29 Jan 2010 18:43:53 +0000 (18:43 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 29 Jan 2010 18:43:53 +0000 (18:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94824 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index 361bc865d79c6b7a320c1c534c148777a9194da7..24cad2a9c574c7463b02166b9fa9add307dff76d 100644 (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));