diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-25 01:25:15 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-25 01:25:15 +0000 |
commit | ecbdf75049f589bace23199f07f23bedcea51b62 (patch) | |
tree | 587591e33c3ca37c654fab403b2ed9688e9ae02d /clang/lib/Analysis/BugReporter.cpp | |
parent | 9165e165dcbd857fa2fcf3ef396e12d86c951291 (diff) | |
download | bcm5719-llvm-ecbdf75049f589bace23199f07f23bedcea51b62.tar.gz bcm5719-llvm-ecbdf75049f589bace23199f07f23bedcea51b62.zip |
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.
llvm-svn: 50241
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r-- | clang/lib/Analysis/BugReporter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index d213d993f3f..5a0e9cb90ab 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/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; } |