diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-15 03:17:38 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-15 03:17:38 +0000 |
| commit | e1190f73a9f996e1d8594c4b2aead45f54ea8f97 (patch) | |
| tree | 7d6cd7bf3a367420b532f9fc9319eb7dd605bc84 /clang/lib/Analysis/GRExprEngine.cpp | |
| parent | 04fddf0d1f3af5e79e9b00bdaa66ea19fe566a56 (diff) | |
| download | bcm5719-llvm-e1190f73a9f996e1d8594c4b2aead45f54ea8f97.tar.gz bcm5719-llvm-e1190f73a9f996e1d8594c4b2aead45f54ea8f97.zip | |
Extend the ProgramPoint to include the context information LocationContext,
which is either a stack frame context of the function or a local scope
context.
llvm-svn: 79072
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
| -rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 47f77ce3bdc..849dd354bbd 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -149,11 +149,12 @@ static inline Selector GetNullarySelector(const char* name, ASTContext& Ctx) { GRExprEngine::GRExprEngine(CFG& cfg, Decl& CD, ASTContext& Ctx, - LiveVariables& L, BugReporterData& BRD, + LiveVariables& L, AnalysisManager &mgr, bool purgeDead, bool eagerlyAssume, StoreManagerCreator SMC, ConstraintManagerCreator CMC) - : CoreEngine(cfg, CD, Ctx, *this), + : AMgr(mgr), + CoreEngine(cfg, CD, Ctx, *this), G(CoreEngine.getGraph()), Liveness(L), Builder(NULL), @@ -165,7 +166,7 @@ GRExprEngine::GRExprEngine(CFG& cfg, Decl& CD, ASTContext& Ctx, NSExceptionII(NULL), NSExceptionInstanceRaiseSelectors(NULL), RaiseSel(GetNullarySelector("raise", G.getContext())), PurgeDead(purgeDead), - BR(BRD, *this), + BR(mgr, *this), EagerlyAssume(eagerlyAssume) {} GRExprEngine::~GRExprEngine() { @@ -1699,7 +1700,8 @@ void GRExprEngine::EvalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src, if (const GRState *stateTrue = state->assume(V, true)) { stateTrue = stateTrue->bindExpr(Ex, ValMgr.makeIntVal(1U, Ex->getType())); - Dst.Add(Builder->generateNode(PostStmtCustom(Ex, &EagerlyAssumeTag), + Dst.Add(Builder->generateNode(PostStmtCustom(Ex, + &EagerlyAssumeTag, Pred->getLocationContext()), stateTrue, Pred)); } @@ -1707,7 +1709,8 @@ void GRExprEngine::EvalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src, if (const GRState *stateFalse = state->assume(V, false)) { stateFalse = stateFalse->bindExpr(Ex, ValMgr.makeIntVal(0U, Ex->getType())); - Dst.Add(Builder->generateNode(PostStmtCustom(Ex, &EagerlyAssumeTag), + Dst.Add(Builder->generateNode(PostStmtCustom(Ex, &EagerlyAssumeTag, + Pred->getLocationContext()), stateFalse, Pred)); } } |

