diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-21 21:03:30 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-21 21:03:30 +0000 |
commit | 32c3fa4195762ba93f0b7114ab36c0941bc34432 (patch) | |
tree | c6c22b635c76549ba054bf4b2d5d8a6068e5783c /lib/Analysis/SimpleSValuator.cpp | |
parent | cb077fc8e0d440f024bbdf57983b84b6d658b60b (diff) |
Fix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
to SValuator::EvalCast. In the process, the StoreManagers now use this new cast
machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts
involving OSAtomicCompareAndSwap and friends has been removed (and replaced with
logic closer to the logic specific to those functions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SimpleSValuator.cpp')
-rw-r--r-- | lib/Analysis/SimpleSValuator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/SimpleSValuator.cpp b/lib/Analysis/SimpleSValuator.cpp index 7462fe65fe..9850b2e036 100644 --- a/lib/Analysis/SimpleSValuator.cpp +++ b/lib/Analysis/SimpleSValuator.cpp @@ -19,12 +19,14 @@ using namespace clang; namespace { class VISIBILITY_HIDDEN SimpleSValuator : public SValuator { +protected: + virtual SVal EvalCastNL(NonLoc val, QualType castTy); + virtual SVal EvalCastL(Loc val, QualType castTy); + public: SimpleSValuator(ValueManager &valMgr) : SValuator(valMgr) {} virtual ~SimpleSValuator() {} - virtual SVal EvalCastNL(NonLoc val, QualType castTy); - virtual SVal EvalCastL(Loc val, QualType castTy); virtual SVal EvalMinus(NonLoc val); virtual SVal EvalComplement(NonLoc val); virtual SVal EvalBinOpNN(BinaryOperator::Opcode op, NonLoc lhs, NonLoc rhs, |