}
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,
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));
}
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() {}
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);
// 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();
class ASTContext;
class GRSimpleVals : public GRTransferFuncs {
+protected:
+
+ virtual RVal DetermEvalBinOpNN(ValueStateManager& StateMgr,
+ BinaryOperator::Opcode Op,
+ NonLVal L, NonLVal R);
+
public:
GRSimpleVals() {}
virtual ~GRSimpleVals() {}
// 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);
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)));
}