summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.Ted Kremenek2009-12-043-39/+36
| | | | llvm-svn: 90503
* More template-logic for MemRegion construction out of MemRegion.h and into ↵Ted Kremenek2009-12-041-0/+155
| | | | | | MemRegion.cpp. llvm-svn: 90499
* Tweak handling of BlockDataRegions in ↵Ted Kremenek2009-12-031-4/+6
| | | | | | RegionStoreManager::RemoveDeadBindings(): only the VarRegions for variables marked with the '__block' annotation should have their lifetime extended by a BlockDataRegion. llvm-svn: 90462
* Add security syntactic checker for mktemp.Zhongxing Xu2009-12-031-1/+41
| | | | | | Patch by Lei Zhang! llvm-svn: 90444
* Update CMake for CallGraph.cpp move.Daniel Dunbar2009-12-031-1/+0
| | | | llvm-svn: 90443
* Add value invalidation logic for block-captured variables. Conceptually ↵Ted Kremenek2009-12-032-2/+23
| | | | | | invoking a block (without specific reasoning of what the block does) can invalidate any value to it by reference when the block was created. llvm-svn: 90431
* Make BlockDataRegion::referenced_vars_iterator an actual class that enforces ↵Ted Kremenek2009-12-031-2/+4
| | | | | | that all MemRegions iterated over are VarRegions. llvm-svn: 90430
* Fix layering violation by moving Analysis/CallGraph to IndexDaniel Dunbar2009-12-031-150/+0
| | | | llvm-svn: 90424
* Add batch version of 'StoreManager::InvalidateRegion()' for invalidating ↵Ted Kremenek2009-12-033-28/+64
| | | | | | multiple regions as once. After adopting this in the CFRefCount::EvalCall(), we see a reduction in analysis time of 1.5% when analyzing all of SQLite3. llvm-svn: 90405
* Add a heuristic to the dead stores checker to prune dead stores for ↵Ted Kremenek2009-12-031-1/+2
| | | | | | variables annotated with '__block'. This is overly conservative, but now the analyzer doesn't report dead stores for variables that can be updated by a block call. llvm-svn: 90364
* Hard bifurcate the state into nil receiver and non-nil receiver, so thatZhongxing Xu2009-12-023-83/+73
| | | | | | | | | | | we don't need to use the DoneEvaluation hack when check for ObjCMessageExpr. PreVisitObjCMessageExpr() only checks for undefined receiver or arguments. Add checker interface EvalNilReceiver(). This is a 'once-and-done' interface. llvm-svn: 90296
* Provide the correct vector size for referenced variables.Ted Kremenek2009-12-011-1/+1
| | | | llvm-svn: 90267
* Fix early-return logic in scanReachableSymbols() to match the rest of the ↵Ted Kremenek2009-12-011-6/+6
| | | | | | recursive logic in the methods of ScanReachableSymbols. llvm-svn: 90245
* Eliminate another VISIBILITY_HIDDENDouglas Gregor2009-11-301-4/+1
| | | | llvm-svn: 90139
* Adapt to the DOTGraphTraits changes in LLVM.Tobias Grosser2009-11-303-4/+11
| | | | llvm-svn: 90137
* Port BugReporter and BugType to StringRef.Benjamin Kramer2009-11-298-23/+20
| | | | llvm-svn: 90086
* Kill some unnecessary calls to c_str().Benjamin Kramer2009-11-293-5/+4
| | | | llvm-svn: 90084
* Fix null dereference in UndefResultChecker identified by running the ↵Ted Kremenek2009-11-291-2/+3
| | | | | | analyzer over Postgresql. llvm-svn: 90060
* Cleanup includes and forward decls.Benjamin Kramer2009-11-282-0/+2
| | | | llvm-svn: 90034
* Remove unneeded includes.Benjamin Kramer2009-11-281-10/+2
| | | | llvm-svn: 90032
* lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespaceKovarththanan Rajaratnam2009-11-2841-119/+104
| | | | llvm-svn: 90028
* Improve diagnostics in ReturnStackAddressChecker for returning a ↵Ted Kremenek2009-11-261-0/+8
| | | | | | stack-allocated block. Implements the rest of <rdar://problem/7387385>. llvm-svn: 89940
* Add a PostVisitBlockExpr() method to RetainReleaseChecker to query forTed Kremenek2009-11-261-1/+27
| | | | | | | | the set of variables "captured" by a block. Until the analysis gets more sophisticated, for now we stop the retain count tracking of any objects (transitively) referenced by these variables. llvm-svn: 89929
* Teach RegionStoreManager::RemoveDeadBindings() about BlockDataRegions. Any ↵Ted Kremenek2009-11-261-4/+17
| | | | | | VarRegion for a "captured" variable should also be considered live. llvm-svn: 89928
* Add iterators to BlockDataRegion that allow clients to iterate over the ↵Ted Kremenek2009-11-261-1/+61
| | | | | | VarRegions for "captured" variables for a block. llvm-svn: 89927
* Added batch versions of GRState::scanReachableSymbols() so that clients can ↵Ted Kremenek2009-11-261-0/+21
| | | | | | scan a collection of SVals or MemRegions all at once. llvm-svn: 89926
* Enhance LiveVariables to understand that blocks can extend the liveness of a ↵Ted Kremenek2009-11-262-15/+92
| | | | | | | | | | | | | | | 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 missing case in switch statement.Ted Kremenek2009-11-251-1/+2
| | | | llvm-svn: 89903
* Refine MemRegions for blocks. Add a new region calledTed Kremenek2009-11-255-7/+43
| | | | | | | | | | | 'BlockDataRegion' to distinguish between the code associated with a block (which is represented by 'BlockTextRegion') and an instance of a block, which includes both code and data. 'BlockDataRegion' has an associated LocationContext, which can be used to eventually model the lifetime of a block object once LocationContexts can represent scopes (and iterations around a loop, etc.). llvm-svn: 89900
* Remove recently added FIXME. The appropriate FIXME is already in ↵Ted Kremenek2009-11-251-2/+0
| | | | | | MemRegionManager::getVarRegion(). llvm-svn: 89897
* Add FIXME.Ted Kremenek2009-11-251-0/+2
| | | | llvm-svn: 89892
* Add post-visit Checker support in GRExprEngine for BlockExpr.Ted Kremenek2009-11-251-1/+7
| | | | llvm-svn: 89890
* Add a new RetainReleaseChecker class (that subclasses CheckerVisitor) to ↵Ted Kremenek2009-11-251-0/+22
| | | | | | extend the functionality of the retain/release checker using the new Checker interface. Pieces of CFRefCount will gradually be migrated to this new class over time. llvm-svn: 89889
* Move RegisterChecks() to the end of the file. No functionality change.Ted Kremenek2009-11-251-57/+59
| | | | llvm-svn: 89888
* Make RegisterInternalChecks() part of GRExprEngine's private implementation ↵Ted Kremenek2009-11-251-30/+32
| | | | | | by making it a static function within GRExprEngine.cpp. llvm-svn: 89884
* Register internal checks with GRExprEngine when it is constructed, not ↵Ted Kremenek2009-11-251-1/+5
| | | | | | manually in AnalysisConsumer.cpp. llvm-svn: 89883
* When dispatching to Checker objects in GRExprEngine::CheckerVisit(),Ted Kremenek2009-11-251-4/+12
| | | | | | | | | only stop processing the checkers after all the nodes for a current check have been processed. This (I believe) handles the case where PredSet (the input nodes) contains more than one node due to state bifurcation. Zhongxing: can you review this? llvm-svn: 89882
* Add really basic support for blocks in the retain/release checker. For now, ↵Ted Kremenek2009-11-251-3/+14
| | | | | | anytime we pass a tracked object to a block call we stop tracking it. llvm-svn: 89831
* Allow building of CFGs for ASTs that contain BlockExprs.Ted Kremenek2009-11-251-3/+6
| | | | llvm-svn: 89830
* Add transfer function support for BlockExpr.Ted Kremenek2009-11-251-0/+12
| | | | llvm-svn: 89829
* Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a ↵Ted Kremenek2009-11-256-16/+49
| | | | | | precursor to having basic static analysis support for blocks. llvm-svn: 89828
* For the nil-receiver checker, take into account the behavioral changes that ↵Ted Kremenek2009-11-241-6/+19
| | | | | | got introduced in Mac OS X 10.5 and later, notably return values of double, float, etc., will not be garbage. Fixes <rdar://problem/6829160>. llvm-svn: 89809
* Cleanups and fixes to the nil-receiver checker, some of it fallout theTed Kremenek2009-11-242-114/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | initial transition of the nil-receiver checker to the Checker interface as done in r89745. Some important changes include: 1) We consolidate the BugType object used for nil receiver bug reports, and don't include the type of the returned value in the BugType (which would be wrong if a nil receiver bug was reported more than once) 2) Added a new (temporary) flag to CheckerContext: DoneEvauating. This is used by GRExprEngine when evaluating message expressions to not continue evaluating the message expression if this flag is set. This flag is currently set by the nil receiver checker. This is an intermediate solution to allow the nil-receiver checker to properly work as a plug-in outside of GRExprEngine. Basically, this flag indicates that the entire message expression has been evaluated, not just a precondition (which is what the nil-receiver checker does). This flag *should not* be repurposed for general use, but just to pull more things out of GRExprEngine that already in there as we devise a better interface in the Checker class. 3) Cleaned up the logic in the nil-receiver checker, making the control-flow a lot easier to read. llvm-svn: 89804
* We can remove this file now.Zhongxing Xu2009-11-242-31/+0
| | | | llvm-svn: 89751
* Refactor undefined result checker. This is the last one.Zhongxing Xu2009-11-245-154/+122
| | | | llvm-svn: 89750
* Refactor NilReceiverStructRet and NilReceiverLargerThanVoidPtrRet into Zhongxing Xu2009-11-244-157/+134
| | | | | | CallAndMessageChecker. llvm-svn: 89745
* rename UndefinedArgChecker to CallAndMessageChecker.Zhongxing Xu2009-11-243-16/+16
| | | | llvm-svn: 89735
* Rename: UndefinedArgChecker.cpp => CallAndMessageChecker.cppZhongxing Xu2009-11-242-1/+1
| | | | llvm-svn: 89734
OpenPOWER on IntegriCloud