]> granicus.if.org Git - clang/commitdiff
Switch Sema::CreateOverloadedUnaryOp over to InitializationSequence.
authorDouglas Gregor <dgregor@apple.com>
Wed, 23 Dec 2009 00:02:00 +0000 (00:02 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 23 Dec 2009 00:02:00 +0000 (00:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91948 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index 44eb184a36fe319103a80e2ea4567803a918fd83..8b5a72de361dbf4ef55ea6c413f1edf8c0ae428a 100644 (file)
@@ -5001,10 +5001,15 @@ Sema::OwningExprResult Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc,
           return ExprError();
       } else {
         // Convert the arguments.
-        if (PerformCopyInitialization(Input,
-                                      FnDecl->getParamDecl(0)->getType(),
-                                      AA_Passing))
+        input = PerformCopyInitialization(
+                                     InitializedEntity::InitializeParameter(
+                                                      FnDecl->getParamDecl(0)),
+                                          SourceLocation(), 
+                                          move(input));
+        if (input.isInvalid())
           return ExprError();
+        
+        Input = (Expr *)input.get();
       }
 
       // Determine the result type