From: Ted Kremenek Date: Tue, 24 Feb 2009 23:34:17 +0000 (+0000) Subject: Fix broken logic from my last commit. Branches only occur at basic blocks that end... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6431a269563de05e011fd1cfbd0d95b96eb5fea8;p=clang Fix broken logic from my last commit. Branches only occur at basic blocks that end with terminators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65410 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index faf7839418..652b65f648 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -2707,8 +2707,8 @@ CFRefLeakReport::getEndPath(BugReporter& br, const ExplodedNode* EndN){ // FIXME: What we really want is to set LeakN to be the node // for the BlockEntrance for the branch we took and have BugReporter // do the right thing. - atBranch = true; S = BE->getSrc()->getTerminator(); + atBranch = (S != 0); } if (S) {