From ecbdf75049f589bace23199f07f23bedcea51b62 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 25 Apr 2008 01:25:15 +0000 Subject: 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 , although the diagnostics still need to be improved. llvm-svn: 50241 --- clang/lib/Analysis/BugReporter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'clang/lib/Analysis/BugReporter.cpp') 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* G, ExplodedNode* N) { llvm::OwningPtr > 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* NOld = N; + N = 0; for (ExplodedGraph::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; } -- cgit v1.2.3