summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/ExplodedGraph.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang's use of DenseMap iterators after r86636 fixed their constness.Jeffrey Yasskin2009-11-101-1/+1
| | | | | | Patch by Victor Zverovich! llvm-svn: 86638
* Change ExplodedNode to have its NodeGroups all BumpPtrAllocated, avoiding ↵Ted Kremenek2009-10-071-35/+26
| | | | | | | | malloc() traffic when adding successors/predecessors to a node. This was done by introducing BumpVector, which is essentially SmallVector with all memory being BumpPtrAllocated (this can certainly be cleaned up or moved into llvm/ADT). This change yields a 1.8% speed increase when running the analyzer (with -analyzer-store=region) on a small benchmark file. llvm-svn: 83439
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-35/+35
| | | | llvm-svn: 81346
* Core analysis engine template cleanup step 2: Zhongxing Xu2009-08-061-11/+52
| | | | | | merge ExplodedGraphImpl and ExplodedGraph. llvm-svn: 78291
* When profiling an ExplodedNode, don't re-profile the state: they haveTed Kremenek2009-08-061-1/+1
| | | | | | already been uniqued. llvm-svn: 78279
* As GRState seems general enough, it is time to merge some template classes Zhongxing Xu2009-08-061-33/+41
| | | | | | | and their impl base classes. This can greatly simply some code of the core analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode. llvm-svn: 78270
* Use the correct data structures!Ted Kremenek2009-03-121-5/+3
| | | | | | | | | | | | | | | | 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. llvm-svn: 66842
* Greatly simplify the logic in ExplodedGraphImpl::TrimGraph. Now we just do aTed Kremenek2009-02-201-111/+42
| | | | | | | | | 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. llvm-svn: 65160
* Hooked up the necessary machinery to allow the retain/release checker referenceTed Kremenek2009-02-181-1/+4
| | | | | | | | | | | | | 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. llvm-svn: 64881
* Overhaul BugReporter interface and implementation. The new interface cleans upTed Kremenek2009-02-041-10/+32
| | | | | | | | | | | | | | | | | | | | | 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). llvm-svn: 63796
* More hacking on static analyzer diagnostics. When emitting summary ↵Ted Kremenek2009-01-241-13/+12
| | | | | | 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. llvm-svn: 62903
* Added "Auditor" interface for auditing the construction of ExplodedGraphs.Ted Kremenek2008-08-271-0/+23
| | | | llvm-svn: 55403
* Make implementation of ExplodedNodeImpl::addPredecessor out-of-line.Ted Kremenek2008-08-271-0/+6
| | | | llvm-svn: 55402
* Use back() instead of end()-1Argyrios Kyrtzidis2008-04-221-2/+2
| | | | llvm-svn: 50098
* Fix improper dereference of end() iterator. Patch by Argiris Kirtzidis!Ted Kremenek2008-04-201-2/+5
| | | | llvm-svn: 50012
* In ExplodedGraphImpl::Trim, prioritize for paths that don't span loops by usingTed Kremenek2008-04-161-5/+34
| | | | | | | | | 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. llvm-svn: 49791
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+227
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. llvm-svn: 48402
OpenPOWER on IntegriCloud