]> granicus.if.org Git - clang/commitdiff
Renamed deterministic EvalBinOp to DetermEvalBinOpNN. This name mangling is unfortun...
authorTed Kremenek <kremenek@apple.com>
Fri, 18 Jul 2008 15:27:58 +0000 (15:27 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 18 Jul 2008 15:27:58 +0000 (15:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53751 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/GRExprEngine.h
include/clang/Analysis/PathSensitive/GRTransferFuncs.h
lib/Analysis/GRSimpleVals.cpp
lib/Analysis/GRSimpleVals.h
lib/Analysis/GRTransferFuncs.cpp

index 4a04247139b74e4433f82e1f664b397c9646b7df..0a0516e6024c5203319a32e5ad89d072b8fa36c3 100644 (file)
@@ -548,12 +548,13 @@ protected:
   }
   
   RVal EvalBinOp(BinaryOperator::Opcode Op, NonLVal L, NonLVal R) {
-    return R.isValid() ? getTF().EvalBinOp(getStateManager(), Op, L, R) : R;
+    return R.isValid() ? getTF().DetermEvalBinOpNN(getStateManager(), Op, L, R)
+                       : R;
   }
 
   RVal EvalBinOp(BinaryOperator::Opcode Op, NonLVal L, RVal R) {
-    return R.isValid() ? getTF().EvalBinOp(getStateManager(), Op, L,
-                                           cast<NonLVal>(R)) : R;
+    return R.isValid() ? getTF().DetermEvalBinOpNN(getStateManager(), Op, L,
+                                                   cast<NonLVal>(R)) : R;
   }
   
   void EvalBinOp(ExplodedNodeSet<ValueState>& Dst, Expr* Ex,
@@ -589,8 +590,8 @@ protected:
                                cast<NonLVal>(L));
     }
     else
-      return getTF().EvalBinOp(getStateManager(), Op, cast<NonLVal>(L),
-                               cast<NonLVal>(R));
+      return getTF().DetermEvalBinOpNN(getStateManager(), Op, cast<NonLVal>(L),
+                                       cast<NonLVal>(R));
   }
   
   
index db7de8162144b4d7546522e7aa90d2e699396352..8a9b9741d4d99fb51f303651e46c53d3aa430277 100644 (file)
@@ -25,6 +25,19 @@ namespace clang {
   class ObjCMessageExpr;
   
 class GRTransferFuncs {
+  
+  friend class GRExprEngine;
+  
+protected:
+  
+  
+  virtual RVal DetermEvalBinOpNN(ValueStateManager& StateMgr,
+                                 BinaryOperator::Opcode Op,
+                                 NonLVal L, NonLVal R) {
+    return UnknownVal();
+  }
+  
+  
 public:
   GRTransferFuncs() {}
   virtual ~GRTransferFuncs() {}
@@ -47,12 +60,6 @@ public:
   virtual RVal EvalComplement(GRExprEngine& Engine, NonLVal X) = 0;
 
   // Binary Operators.
-  
-  virtual RVal EvalBinOp(ValueStateManager& StateMgr, BinaryOperator::Opcode Op,
-                         NonLVal L, NonLVal R) {
-    return UnknownVal();
-  }
-  
   virtual void EvalBinOpNN(ValueStateSet& OStates, ValueStateManager& StateMgr,
                            const ValueState* St, Expr* Ex,
                            BinaryOperator::Opcode Op, NonLVal L, NonLVal R);
index f95ccb564f729730827f1f55ca760cedb03f6e6e..cc31ddddef84bd7ad43e60fa282c2367793544d9 100644 (file)
@@ -450,8 +450,9 @@ RVal GRSimpleVals::EvalComplement(GRExprEngine& Eng, NonLVal X) {
 
 // Binary operators.
 
-RVal GRSimpleVals::EvalBinOp(ValueStateManager& StateMgr,
-                             BinaryOperator::Opcode Op, NonLVal L, NonLVal R)  {
+RVal GRSimpleVals::DetermEvalBinOpNN(ValueStateManager& StateMgr,
+                                     BinaryOperator::Opcode Op,
+                                     NonLVal L, NonLVal R)  {
   
   BasicValueFactory& BasicVals = StateMgr.getBasicVals();
   
index fc20c3e5bc8cfae67daaae3a7a0efebd6d638999..ac07f8b32416e7146b3015540d0f535fd520e04d 100644 (file)
@@ -25,6 +25,12 @@ class PathDiagnostic;
 class ASTContext;
   
 class GRSimpleVals : public GRTransferFuncs {
+protected:
+  
+  virtual RVal DetermEvalBinOpNN(ValueStateManager& StateMgr,
+                                 BinaryOperator::Opcode Op,
+                                 NonLVal L, NonLVal R);
+  
 public:
   GRSimpleVals() {}
   virtual ~GRSimpleVals() {}
@@ -44,9 +50,6 @@ public:
   
   // Binary Operators.
   
-  virtual RVal EvalBinOp(ValueStateManager& StateMgr, BinaryOperator::Opcode Op,
-                         NonLVal L, NonLVal R);
-  
   virtual RVal EvalBinOp(GRExprEngine& Engine, BinaryOperator::Opcode Op,
                          LVal L, LVal R);
   
index 9d9c97f0edf8998f93e3e7bf5245d201e9cfaadb..e30e0712c510d61b445cbb3d0bb21e63b7bcfb3f 100644 (file)
@@ -44,5 +44,5 @@ void GRTransferFuncs::EvalBinOpNN(ValueStateSet& OStates,
                                   BinaryOperator::Opcode Op,
                                   NonLVal L, NonLVal R) {
   
-  OStates.Add(StateMgr.SetRVal(St, Ex, EvalBinOp(StateMgr, Op, L, R)));
+  OStates.Add(StateMgr.SetRVal(St, Ex, DetermEvalBinOpNN(StateMgr, Op, L, R)));
 }