diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-16 07:06:26 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-16 07:06:26 +0000 |
commit | cb529b542a6c473251d15fdd637b3230906ea1dc (patch) | |
tree | a2fc8fa7572ae8741b7eedb67dbe5b30fcb5f816 /lib/Analysis/GRExprEngine.cpp | |
parent | 5ea7d07ea7d9f2b679c85df7cc45fcc6e157e396 (diff) |
Enhance modularization: return a <state,loc> pair to let GRExprEngine modify the
environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index e002c13637..fe7d6f9426 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -1698,11 +1698,15 @@ void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst){ assert(Loc::IsLocType(ExTy)); // Delegate to store manager. - const GRState* NewSt = getStoreManager().CastRegion(St, V, T, CastE); + std::pair<const GRState*, SVal> Res = + getStoreManager().CastRegion(St, V, T, CastE); + + const GRState* NewSt = Res.first; + SVal NewPtr = Res.second; // If no new region is created, fall through to the default case. if (NewSt != St) { - MakeNode(Dst, CastE, N, NewSt); + MakeNode(Dst, CastE, N, BindExpr(NewSt, CastE, NewPtr)); continue; } } |