]> granicus.if.org Git - clang/commitdiff
Fix broken logic from my last commit. Branches only occur at basic blocks that end...
authorTed Kremenek <kremenek@apple.com>
Tue, 24 Feb 2009 23:34:17 +0000 (23:34 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 24 Feb 2009 23:34:17 +0000 (23:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65410 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index faf783941841c841c5cddbd9380c5d6faf03cd3e..652b65f6488a782c97812fd5789578e294b97ef3 100644 (file)
@@ -2707,8 +2707,8 @@ CFRefLeakReport::getEndPath(BugReporter& br, const ExplodedNode<GRState>* 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) {