aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-04-10 06:06:13 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-04-10 06:06:13 +0000
commit3330dcb0da654fb06e78dc410ba15ab90c1b08e7 (patch)
treeed0dbdc26f9c15004dc6c1e1cd79454831d980b4 /lib/Analysis/GRExprEngine.cpp
parent28935899c1668337982ecaa0aadf999cc40d9adf (diff)
Finally nuke loc::SymbolVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp38
1 files changed, 1 insertions, 37 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 46d1f798cf..4fe6fd6b90 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -2027,43 +2027,7 @@ void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst){
MakeNode(Dst, CastE, N, BindExpr(Res.getState(), CastE, V));
continue;
}
-
- // If we are casting a symbolic value, make a symbolic region and a
- // TypedViewRegion subregion.
- if (loc::SymbolVal* SV = dyn_cast<loc::SymbolVal>(&V)) {
- SymbolRef Sym = SV->getSymbol();
- QualType SymTy = getSymbolManager().getType(Sym);
-
- // Just pass through symbols that are function or block pointers.
- if (SymTy->isFunctionPointerType() || SymTy->isBlockPointerType())
- goto PassThrough;
-
- // Are we casting to a function or block pointer?
- if (T->isFunctionPointerType() || T->isBlockPointerType()) {
- // FIXME: We should verify that the underlying type of the symbolic
- // pointer is a void* (or maybe char*). Other things are an abuse
- // of the type system.
- goto PassThrough;
- }
-
- StoreManager& StoreMgr = getStoreManager();
- const MemRegion* R = StoreMgr.getRegionManager().getSymbolicRegion(Sym);
-
- // Delegate to store manager to get the result of casting a region
- // to a different type.
- const StoreManager::CastResult& Res = StoreMgr.CastRegion(state, R, T);
-
- // Inspect the result. If the MemRegion* returned is NULL, this
- // expression evaluates to UnknownVal.
- R = Res.getRegion();
- if (R) { V = loc::MemRegionVal(R); } else { V = UnknownVal(); }
-
- // Generate the new node in the ExplodedGraph.
- MakeNode(Dst, CastE, N, BindExpr(Res.getState(), CastE, V));
- continue;
- }
-
- // All other cases.
+ // All other cases.
DispatchCast: {
MakeNode(Dst, CastE, N, BindExpr(state, CastE,
EvalCast(V, CastE->getType())));