[cfe-commits] r94823 - /cfe/trunk/lib/Sema/SemaOverload.cpp
Anders Carlsson
andersca at mac.com
Fri Jan 29 10:37:50 PST 2010
Author: andersca
Date: Fri Jan 29 12:37:50 2010
New Revision: 94823
URL: http://llvm.org/viewvc/llvm-project?rev=94823&view=rev
Log:
Another PerformCopyInitialization call bites the dust.
Modified:
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=94823&r1=94822&r2=94823&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Jan 29 12:37:50 2010
@@ -5878,12 +5878,20 @@
// 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();
More information about the cfe-commits
mailing list