diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-14 06:35:09 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-14 06:35:09 +0000 |
commit | 5eb08f79fc2e1f299cf39c977da55184147f3743 (patch) | |
tree | 8d3025ad4fbc91f5d2ac6cdbe7aad22efbb5d077 /clang/lib/Checker/GRCoreEngine.cpp | |
parent | 3fd05096cef29bada562929db9a1d0d8fb4bbf5b (diff) | |
download | bcm5719-llvm-5eb08f79fc2e1f299cf39c977da55184147f3743.tar.gz bcm5719-llvm-5eb08f79fc2e1f299cf39c977da55184147f3743.zip |
Move GRStmtNodeBuilder::MakeNode() out of line. No functionality change.
llvm-svn: 101239
Diffstat (limited to 'clang/lib/Checker/GRCoreEngine.cpp')
-rw-r--r-- | clang/lib/Checker/GRCoreEngine.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/lib/Checker/GRCoreEngine.cpp b/clang/lib/Checker/GRCoreEngine.cpp index e4ef6b0e106..23a87d303b4 100644 --- a/clang/lib/Checker/GRCoreEngine.cpp +++ b/clang/lib/Checker/GRCoreEngine.cpp @@ -455,6 +455,33 @@ void GRStmtNodeBuilder::GenerateAutoTransition(ExplodedNode* N) { Eng.WList->Enqueue(Succ, B, Idx+1); } +ExplodedNode* GRStmtNodeBuilder::MakeNode(ExplodedNodeSet& Dst, Stmt* S, + ExplodedNode* Pred, const GRState* St, + ProgramPoint::Kind K) { + const GRState* PredState = GetState(Pred); + + // If the state hasn't changed, don't generate a new node. + if (!BuildSinks && St == PredState && Auditor == 0) { + Dst.Add(Pred); + return NULL; + } + + ExplodedNode* N = generateNode(S, St, Pred, K); + + if (N) { + if (BuildSinks) + N->markAsSink(); + else { + if (Auditor && Auditor->Audit(N, Mgr)) + N->markAsSink(); + + Dst.Add(N); + } + } + + return N; +} + static ProgramPoint GetProgramPoint(const Stmt *S, ProgramPoint::Kind K, const LocationContext *LC, const void *tag){ switch (K) { |