Skip to content

Commit e914bb8

Browse files
committed
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
1 parent ac886cb commit e914bb8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/Analysis/ExplodedGraph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ExplodedNodeImpl** ExplodedNodeImpl::NodeGroup::begin() const {
6060

6161
ExplodedNodeImpl** ExplodedNodeImpl::NodeGroup::end() const {
6262
if (getKind() == Size1)
63-
return ((ExplodedNodeImpl**) &P)+1;
63+
return (ExplodedNodeImpl**) (P ? &P+1 : &P);
6464
else
6565
return const_cast<ExplodedNodeImpl**>(&*(getVector(getPtr()).rbegin())+1);
6666
}

clang/Analysis/GREngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void GREngineImpl::HandlePostStmt(const PostStmt& L, CFGBlock* B,
167167
HandleBlockExit(B, Pred);
168168
else {
169169
GRNodeBuilderImpl Builder(B, StmtIdx, Pred, this);
170-
ProcessStmt(L.getStmt(), Builder);
170+
ProcessStmt((*B)[StmtIdx], Builder);
171171
}
172172
}
173173

0 commit comments

Comments
 (0)