diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-01-16 22:13:19 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-01-16 22:13:19 +0000 |
commit | e914bb8183dbb6d7025bf3304382c852fd6e2aaf (patch) | |
tree | cfec84eace7ca826f5c0e552d3216d8ff2febf0c | |
parent | Added initial graph visualization support for the GRConstants analysis. (diff) | |
download | llvm-project-e914bb8183dbb6d7025bf3304382c852fd6e2aaf.tar.gz llvm-project-e914bb8183dbb6d7025bf3304382c852fd6e2aaf.tar.bz2 llvm-project-e914bb8183dbb6d7025bf3304382c852fd6e2aaf.zip |
Fixed iterator bug in ExplodedNodeImpl::NodeGroup::end(); we would improperly
handle the case where the number of nodes was 0.
Fixed bug in GREngineImpl where we did not proceed to the next statement
when processing a PostStmt location.
llvm-svn: 46093
-rw-r--r-- | clang/Analysis/ExplodedGraph.cpp | 2 | ||||
-rw-r--r-- | clang/Analysis/GREngine.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/Analysis/ExplodedGraph.cpp b/clang/Analysis/ExplodedGraph.cpp index 35e9d9de9a0e..1cfb02c78777 100644 --- a/clang/Analysis/ExplodedGraph.cpp +++ b/clang/Analysis/ExplodedGraph.cpp @@ -60,7 +60,7 @@ ExplodedNodeImpl** ExplodedNodeImpl::NodeGroup::begin() const { ExplodedNodeImpl** ExplodedNodeImpl::NodeGroup::end() const { if (getKind() == Size1) - return ((ExplodedNodeImpl**) &P)+1; + return (ExplodedNodeImpl**) (P ? &P+1 : &P); else return const_cast<ExplodedNodeImpl**>(&*(getVector(getPtr()).rbegin())+1); } diff --git a/clang/Analysis/GREngine.cpp b/clang/Analysis/GREngine.cpp index 42951fc24fd8..f0c59cf93a50 100644 --- a/clang/Analysis/GREngine.cpp +++ b/clang/Analysis/GREngine.cpp @@ -167,7 +167,7 @@ void GREngineImpl::HandlePostStmt(const PostStmt& L, CFGBlock* B, HandleBlockExit(B, Pred); else { GRNodeBuilderImpl Builder(B, StmtIdx, Pred, this); - ProcessStmt(L.getStmt(), Builder); + ProcessStmt((*B)[StmtIdx], Builder); } } |