aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-25 01:25:15 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-25 01:25:15 +0000
commit910e999c19dfcad3ae2a649e08e616525cef0af3 (patch)
tree528114f2ad4f4d6e414034532a0964d6ebb523cc /lib/Analysis/BugReporter.cpp
parent652adc6c5de6476d63791cec3e1166ee039e09b6 (diff)
Do a better job at computing dead symbols.
Implemented support for better localized leaks in the CF reference count checker. Now leaks should be flagged close to where they occur. This should implement the desired functionality in <rdar://problem/5879592>, although the diagnostics still need to be improved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50241 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r--lib/Analysis/BugReporter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index d213d993f3..5a0e9cb90a 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -144,14 +144,16 @@ MakeReportGraph(ExplodedGraph<ValueState>* G, ExplodedNode<ValueState>* N) {
llvm::OwningPtr<ExplodedGraph<ValueState> > GTrim(G->Trim(&N, &N+1));
- // Find the sink node in the trimmed graph.
+ // Find the error node in the trimmed graph.
- N = NULL;
+ ExplodedNode<ValueState>* NOld = N;
+ N = 0;
for (ExplodedGraph<ValueState>::node_iterator
I = GTrim->nodes_begin(), E = GTrim->nodes_end(); I != E; ++I) {
- if (I->isSink()) {
+ if (I->getState() == NOld->getState() &&
+ I->getLocation() == NOld->getLocation()) {
N = &*I;
break;
}