summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/AnalysisContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Speed up compilation by avoiding generating exceptional edges fromMike Stump2010-01-211-1/+1
| | | | | | | | | | | | | CallExprs as those edges help cause a n^2 explosion in the number of destructor calls. Other consumers, such as static analysis, that would like to have more a more complete CFG can select the inclusion of those edges as CFG build time. This also fixes up the two compilation users of CFGs to be tolerant of having or not having those edges. All catch code is assumed be to live if we didn't generate the exceptional edges for CallExprs. llvm-svn: 94074
* Add infrastructure to add base initializers and member initializers toMike Stump2010-01-211-1/+1
| | | | | | the CFG. WIP. llvm-svn: 94062
* Add an unreachable code checker.Mike Stump2010-01-131-0/+4
| | | | llvm-svn: 93287
* As Ted suggested, record the callsite information with the StackFrameContext.Zhongxing Xu2009-12-241-3/+13
| | | | llvm-svn: 92121
* Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gaveJeffrey Yasskin2009-12-121-1/+1
| | | | | | no extra safety anyway. llvm-svn: 91207
* Enhance understanding of VarRegions referenced by a block whose declarations ↵Ted Kremenek2009-12-111-0/+13
| | | | | | are outside the current stack frame. Fixes <rdar://problem/7462324>. llvm-svn: 91107
* Add analysis support for blocks. This includes a few key changes:Ted Kremenek2009-12-071-0/+14
| | | | | | | | | | | | | | | | | - Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters. - VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference) - Add transfer function support to GRExprEngine for BlockDeclRefExprs. This change also supports analyzing blocks as an analysis entry point (top-of-the-stack), which required pushing more context-sensitivity around in the MemRegion hierarchy via the use of LocationContext objects. Functionally almost everything is the same, except we track LocationContexts in a few more areas and StackSpaceRegions now refer to a StackFrameContext object. In the future we will need to modify MemRegionManager to allow multiple StackSpaceRegions in flight at once (for the analysis of multiple stack frames). llvm-svn: 90809
* Teach AnalysisContext::getBody() about BlockDecls.Ted Kremenek2009-12-041-0/+2
| | | | llvm-svn: 90585
* Allow BlockInvocationContext to wrap either a BlockDecl* or a ↵Ted Kremenek2009-12-041-3/+16
| | | | | | BlockDataRegion*, giving us choice in our degree of context-sensitivity. llvm-svn: 90516
* Refactor LocationContext creation logic into a single member template.Ted Kremenek2009-12-041-48/+50
| | | | llvm-svn: 90509
* Refactor FoldingSet profiling code for LocationContexts, and add a new ↵Ted Kremenek2009-12-041-8/+25
| | | | | | BlockInvocationContext to represent the invocation of a block. llvm-svn: 90506
* Enhance LiveVariables to understand that blocks can extend the liveness of a ↵Ted Kremenek2009-11-261-12/+75
| | | | | | | | | | | | | | | variable by "capturing" them in a BlockExpr. This required two changes: 1) Added 'getReferencedgetReferencedBlockVars()' to AnalysisContext so that clients can iterate over the "captured" variables in a block. 2) Modified LiveVariables to take an AnalysisContext& in its constructor and to call getReferencedgetReferencedBlockVars() when it processes a BlockExpr*. llvm-svn: 89924
* Add destructor and cleanup code to LocationContext (fixing some leaks). ↵Ted Kremenek2009-10-201-0/+21
| | | | | | | | | Along the way, have AnalysisManager periodically cleanup its AnalysisContextManager and LocationContextManager objects, as they don't need to forever retain all the CFGs ever created when analyzing a file. llvm-svn: 84684
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-9/+9
| | | | llvm-svn: 81346
* Remove 'AnalysisContext::setDecl()', as we the Decl associated with anTed Kremenek2009-08-211-10/+13
| | | | | | | AnalysisContext should never change. Along the way, propagate some constness around. llvm-svn: 79701
* Constify LocationContext* (parent) and Stmt* fields in LocationContext.Ted Kremenek2009-08-211-6/+10
| | | | llvm-svn: 79700
* Remove 'SelfRegion' field from both BasicStoreManager and RegionStoreManager.Ted Kremenek2009-08-211-0/+7
| | | | | | | | | | | | | | | | | | SelfRegion represented the object bound to 'self' (when analyzing Objective-C methods) upon entry to a method. Having this region stored on the side ignores the current stack frame that we might be analyzing (among other things), and is a problem for interprocedural analysis. For RegionStoreManager, the value for SelfRegion is just lazily created. For BasicStoreManager, the value for SelfRegion is bound eagerly to 'self', but no explicit tracking of SelfRegion on the side is made. As part of this change, remove the restriction in BasicStoreManager that we only track ivars for 'self'. This shouldn't actually change anything in terms of precision, and simplifies the logic. llvm-svn: 79694
* add a bunch of routine methods to AnalysisContext.Zhongxing Xu2009-08-031-0/+50
| | | | llvm-svn: 77961
* Fix build warnings.Mike Stump2009-07-311-1/+2
| | | | llvm-svn: 77651
* This patch collects all analysis context data into a new class Zhongxing Xu2009-07-301-0/+73
AnalysisContext. llvm-svn: 77563
OpenPOWER on IntegriCloud