summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/GRCoreEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-08-11 00:03:02 +0000
committerTed Kremenek <kremenek@apple.com>2010-08-11 00:03:02 +0000
commit2b4adffa16302bd75993f5a0c2f1a9f70af4dd38 (patch)
treec3f79f2446b1c65100ca35e4aa59388b3f109d6e /clang/lib/Checker/GRCoreEngine.cpp
parent9664984be899776293e3d705864e133eb5d86f03 (diff)
downloadbcm5719-llvm-2b4adffa16302bd75993f5a0c2f1a9f70af4dd38.tar.gz
bcm5719-llvm-2b4adffa16302bd75993f5a0c2f1a9f70af4dd38.zip
Have GRCoreEngine record the blocks where analysis was aborted because we visited a block too many times along a given path. This is to support the unreachable code analysis.
llvm-svn: 110755
Diffstat (limited to 'clang/lib/Checker/GRCoreEngine.cpp')
-rw-r--r--clang/lib/Checker/GRCoreEngine.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Checker/GRCoreEngine.cpp b/clang/lib/Checker/GRCoreEngine.cpp
index c2a33225370..e0524d9ef4c 100644
--- a/clang/lib/Checker/GRCoreEngine.cpp
+++ b/clang/lib/Checker/GRCoreEngine.cpp
@@ -200,7 +200,7 @@ bool GRCoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps,
}
}
- SubEngine.ProcessEndWorklist(WList->hasWork() || BlockAborted);
+ SubEngine.ProcessEndWorklist(hasWorkRemaining());
return WList->hasWork();
}
@@ -250,8 +250,9 @@ void GRCoreEngine::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) {
if (ProcessBlockEntrance(Blk, Pred, WList->getBlockCounter()))
GenerateNode(BlockEntrance(Blk, Pred->getLocationContext()),
Pred->State, Pred);
- else
- BlockAborted = true;
+ else {
+ blocksAborted.push_back(std::make_pair(L, Pred));
+ }
}
void GRCoreEngine::HandleBlockEntrance(const BlockEntrance& L,
OpenPOWER on IntegriCloud