]> granicus.if.org Git - clang/commitdiff
Regression fix: Handle pointer arithmetic in unary ++/--.
authorTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2008 19:29:23 +0000 (19:29 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2008 19:29:23 +0000 (19:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47449 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRExprEngine.cpp

index 16361c6d86a60462912339423f414f409c13706e..66f5cae65476baf701a06a84bccdb6e264119f4c 100644 (file)
@@ -696,12 +696,12 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
         continue;
       }
       
-      // Handle all NonLVals.
+      // Handle all other values.
       
       BinaryOperator::Opcode Op = U->isIncrementOp() ? BinaryOperator::Add
                                                      : BinaryOperator::Sub;
       
-      RVal Result = EvalBinOp(Op, cast<NonLVal>(V), MakeConstantVal(1U, U));
+      RVal Result = EvalBinOp(Op, V, MakeConstantVal(1U, U));
       
       if (U->isPostfix())
         St = SetRVal(SetRVal(St, U, V), SubLV, Result);