Major cleanup of path-sensitive analysis engine and the current analysis
based on constant. prop. and limited symbolics.
- Renamed class: RValue -> RVal, LValue -> LVal, etc.
- Minor method renamings and interface cleanups.
- Tightened the RVal "type system" so that UninitializedVal and UnknownVal
cannot be cast to LVal or NonLVal. This forces these corner cases values
to be explicitly handled early before being dispatched to plug-in transfer
function logic.
- Major cleanup in the transfer function logic for binary and unary operators.
Still fixing some regressions, but we now explicitly handle Uninitialized
and Unknown values in a more rigorous way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47441 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/GRSimpleVals.h b/Analysis/GRSimpleVals.h
index 3a73e41..28286ec 100644
--- a/Analysis/GRSimpleVals.h
+++ b/Analysis/GRSimpleVals.h
@@ -28,40 +28,35 @@
// Casts.
- virtual RValue EvalCast(ValueManager& ValMgr, NonLValue V, Expr* CastExpr);
- virtual RValue EvalCast(ValueManager& ValMgr, LValue V, Expr* CastExpr);
+ virtual RVal EvalCast(ValueManager& ValMgr, NonLVal V, Expr* CastExpr);
+ virtual RVal EvalCast(ValueManager& ValMgr, LVal V, Expr* CastExpr);
// Unary Operators.
- virtual NonLValue EvalMinus(ValueManager& ValMgr, UnaryOperator* U,
- NonLValue X);
-
- virtual NonLValue EvalPlus(ValueManager& ValMgr, UnaryOperator* U,
- NonLValue X);
-
- virtual NonLValue EvalComplement(ValueManager& ValMgr, NonLValue X);
+ virtual RVal EvalMinus(ValueManager& ValMgr, UnaryOperator* U, NonLVal X);
+
+ virtual RVal EvalComplement(ValueManager& ValMgr, NonLVal X);
// Binary Operators.
- virtual NonLValue EvalBinaryOp(ValueManager& ValMgr,
- BinaryOperator::Opcode Op,
- NonLValue LHS, NonLValue RHS);
+ virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ NonLVal L, NonLVal R);
- virtual RValue EvalBinaryOp(ValueManager& ValMgr,
- BinaryOperator::Opcode Op,
- LValue LHS, LValue RHS);
+ virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ LVal L, LVal R);
// Pointer arithmetic.
- virtual LValue EvalBinaryOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
- LValue LHS, NonLValue RHS);
+ virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ LVal L, NonLVal R);
protected:
- // Equality operators for LValues.
- NonLValue EvalEQ(ValueManager& ValMgr, LValue LHS, LValue RHS);
- NonLValue EvalNE(ValueManager& ValMgr, LValue LHS, LValue RHS);
-};
+ // Equality operators for LVals.
+
+ RVal EvalEQ(ValueManager& ValMgr, LVal L, LVal R);
+ RVal EvalNE(ValueManager& ValMgr, LVal L, LVal R);
+};
} // end clang namespace