diff options
author | ed <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
commit | 8927c19a5ed03bef55dac4b623688387bcc794dc (patch) | |
tree | b6403365e77095a79062d3379c9e6aea0df5f088 /lib/Analysis/GRSimpleVals.cpp | |
parent | b8e7410b22fa573fb0078712439f343bc69208dd (diff) | |
download | FreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.zip FreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.tar.gz |
Update Clang sources to r73879.
Diffstat (limited to 'lib/Analysis/GRSimpleVals.cpp')
-rw-r--r-- | lib/Analysis/GRSimpleVals.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp index e1c4848..7e54f1a 100644 --- a/lib/Analysis/GRSimpleVals.cpp +++ b/lib/Analysis/GRSimpleVals.cpp @@ -363,11 +363,13 @@ void GRSimpleVals::EvalCall(ExplodedNodeSet<GRState>& Dst, for (CallExpr::arg_iterator I = CE->arg_begin(), E = CE->arg_end(); I != E; ++I) { - SVal V = StateMgr.GetSVal(St, *I); + SVal V = St->getSVal(*I); - if (isa<loc::MemRegionVal>(V)) - St = StateMgr.BindLoc(St, cast<Loc>(V), UnknownVal()); - else if (isa<nonloc::LocAsInteger>(V)) + if (isa<loc::MemRegionVal>(V)) { + const MemRegion *R = cast<loc::MemRegionVal>(V).getRegion(); + if (R->isBoundable(Eng.getContext())) + St = StateMgr.BindLoc(St, cast<Loc>(V), UnknownVal()); + } else if (isa<nonloc::LocAsInteger>(V)) St = StateMgr.BindLoc(St, cast<nonloc::LocAsInteger>(V).getLoc(), UnknownVal()); @@ -380,7 +382,7 @@ void GRSimpleVals::EvalCall(ExplodedNodeSet<GRState>& Dst, if (Loc::IsLocType(T) || (T->isIntegerType() && T->isScalarType())) { unsigned Count = Builder.getCurrentBlockCount(); SVal X = Eng.getValueManager().getConjuredSymbolVal(CE, Count); - St = StateMgr.BindExpr(St, CE, X, Eng.getCFG().isBlkExpr(CE), false); + St = St->bindExpr(CE, X, Eng.getCFG().isBlkExpr(CE), false); } Builder.MakeNode(Dst, CE, Pred, St); @@ -398,18 +400,16 @@ void GRSimpleVals::EvalObjCMessageExpr(ExplodedNodeSet<GRState>& Dst, // The basic transfer function logic for message expressions does nothing. - // We just invalidate all arguments passed in by references. - - GRStateManager& StateMgr = Eng.getStateManager(); - const GRState* St = Builder.GetState(Pred); + // We just invalidate all arguments passed in by references. + const GRState *St = Builder.GetState(Pred); for (ObjCMessageExpr::arg_iterator I = ME->arg_begin(), E = ME->arg_end(); I != E; ++I) { - SVal V = StateMgr.GetSVal(St, *I); + SVal V = St->getSVal(*I); if (isa<Loc>(V)) - St = StateMgr.BindLoc(St, cast<Loc>(V), UnknownVal()); + St = St->bindLoc(cast<Loc>(V), UnknownVal()); } Builder.MakeNode(Dst, ME, Pred, St); |