aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ExplodedGraph.cpp
AgeCommit message (Collapse)Author
2009-03-12Use the correct data structures!Ted Kremenek
ExplodedGraph::TrimGraph: - Just do a DFS both ways instead of BFS-DFS. We're just determining what subset of the nodes are reachable from the root and reverse-reachable from the bug nodes. DFS is more efficient for this task. BugReporter: - MakeReportGraph: Do a reverse-BFS instead of a reverse-DFS to determine the approximate shortest path through the simulation graph. We were seeing some weird cases where too many loops were being reported for simple bugs. Possibly we will need to replace this with actually computing the shortest path in terms of line numbers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20Greatly simplify the logic in ExplodedGraphImpl::TrimGraph. Now we just do aTed Kremenek
vanilla reverse-BFS followed by a forward-DFS instead of resulting to strange histrionics (whose purpose I can no longer remember) in the reverse-BFS stage. This fixes an assertion failure in BugReporter due to edge cases where no root was being hit in the reverse-BFS phase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18Hooked up the necessary machinery to allow the retain/release checker referenceTed Kremenek
back to the summary used when evaluating the statement associated with a simulation node. This is now being used to help improve the checker's diagnostics. To get things started, the checker now emits a path diagnostic indicating that 'autorelease' is a no-op in GC mode. Some of these changes are exposing further grossness in the interface between BugReporter and the ExplodedGraph::Trim facilities. These really need to be cleaned up one day. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04Overhaul BugReporter interface and implementation. The new interface cleans upTed Kremenek
the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes, and BugTypes are owned by the BugReporter object. The major functionality change in this patch is that reports are not immediately emitted by a call to BugReporter::EmitWarning (now called EmitReport), but instead of queued up in report "equivalence classes". When BugReporter::FlushReports() is called, it emits one diagnostic per report equivalence class. This provides a nice cleanup with the caching of reports as well as enables the BugReporter engine to select the "best" path for reporting a path-sensitive bug based on all the locations in the ExplodedGraph that the same bug could occur. Along with this patch, Leaks are now coalesced into a common equivalence class by their allocation site, and the "summary" diagnostic for leaks now reports the allocation site as the location of the bug (this may later be augmented to also provide an example location where the leak occurs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63796 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-24More hacking on static analyzer diagnostics. When emitting summary ↵Ted Kremenek
diagnostics the code paths for diagnostics involving paths or single locations are now unified. This patch also constifies many arguments/methods that are touched by this logic, leading to a nice overall code cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62903 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27Added "Auditor" interface for auditing the construction of ExplodedGraphs.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55403 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27Make implementation of ExplodedNodeImpl::addPredecessor out-of-line.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22Use back() instead of end()-1Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50098 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20Fix improper dereference of end() iterator. Patch by Argiris Kirtzidis!Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50012 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16In ExplodedGraphImpl::Trim, prioritize for paths that don't span loops by usingTed Kremenek
two worklists: for nodes whose locations are block edges with loop terminators and another for nodes with all other locations. We only dequeue from the loop worklist when the other is empty. Exploration of the graph is still in reverse-BFS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8