]> granicus.if.org Git - clang/commitdiff
Make CreateOverloadedUnaryOp build the correct node for postinc/dec operators.
authorEli Friedman <eli.friedman@gmail.com>
Wed, 18 Nov 2009 03:58:17 +0000 (03:58 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 18 Nov 2009 03:58:17 +0000 (03:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89192 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index 634c9ceefc73694ad632c347538007ce99141e6b..c39cab211db57ff73d03afcfd71a4adf28247189 100644 (file)
@@ -4754,10 +4754,10 @@ Sema::OwningExprResult Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc,
       UsualUnaryConversions(FnExpr);
 
       input.release();
-
+      Args[0] = Input;
       ExprOwningPtr<CallExpr> TheCall(this,
         new (Context) CXXOperatorCallExpr(Context, Op, FnExpr,
-                                          &Input, 1, ResultTy, OpLoc));
+                                          Args, NumArgs, ResultTy, OpLoc));
       
       if (CheckCallReturnType(FnDecl->getResultType(), OpLoc, TheCall.get(), 
                               FnDecl))