From 6431a269563de05e011fd1cfbd0d95b96eb5fea8 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 24 Feb 2009 23:34:17 +0000 Subject: [PATCH] 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 --- lib/Analysis/CFRefCount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.50.1