diff options
Diffstat (limited to 'lib/Analysis/Store.cpp')
-rw-r--r-- | lib/Analysis/Store.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Analysis/Store.cpp b/lib/Analysis/Store.cpp index fca69e69cb..e2412f6e28 100644 --- a/lib/Analysis/Store.cpp +++ b/lib/Analysis/Store.cpp @@ -197,3 +197,19 @@ StoreManager::CastRegion(const GRState *state, const MemRegion* R, return CastResult(state, R); } + + +/// CastRetrievedVal - Used by subclasses of StoreManager to implement +/// implicit casts that arise from loads from regions that are reinterpreted +/// as another region. +SValuator::CastResult StoreManager::CastRetrievedVal(SVal V, + const GRState *state, + const TypedRegion *R, + QualType castTy) { + if (castTy.isNull()) + return SValuator::CastResult(state, V); + + ASTContext &Ctx = ValMgr.getContext(); + return ValMgr.getSValuator().EvalCast(V, state, castTy, R->getValueType(Ctx)); +} + |