summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-181-1/+2
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* - Move ownership of MemRegionManager into ValueManager.Ted Kremenek2009-04-091-10/+7
| | | | | | | - Pull SVal::GetConjuredSymbol() and friends into ValueManager. This greatly simplifies the calling interface to clients. llvm-svn: 68731
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-091-2/+2
| | | | | | No functionality change (really). llvm-svn: 68726
* analyzer: Introduce a new class, ValueManager, that serves as an aggregateTed Kremenek2009-04-091-16/+12
| | | | | | | | | | | "manager of symbolic values", wrapping BasicValueFactory, SymbolManager, and MemRegionManager. While these individual managers nicely separate functionality in the analyzer, constructing symbolic values can sometimes be cumbersome because it requires using multiple managers at once. The goal of this class is to create some factory methods to create SVals that require the use of these different managers, thus (hopefully) simplifying the analyzer API for clients. llvm-svn: 68709
* stop using loc::SymbolVal.Zhongxing Xu2009-04-091-1/+3
| | | | llvm-svn: 68696
* stop using loc::SymbolVal.Zhongxing Xu2009-04-091-2/+4
| | | | llvm-svn: 68695
* clean up code with new API.Zhongxing Xu2009-04-091-6/+2
| | | | llvm-svn: 68694
* clean up code with new API.Zhongxing Xu2009-04-091-21/+5
| | | | llvm-svn: 68693
* Add a new method because sometimes the type of the conjured symbol is not theZhongxing Xu2009-04-091-1/+1
| | | | | | type of the expression where we create the symbol. llvm-svn: 68692
* make a conjured symbol as the original code.Zhongxing Xu2009-04-091-2/+2
| | | | llvm-svn: 68691
* clean up code with new API.Zhongxing Xu2009-04-091-8/+4
| | | | llvm-svn: 68687
* Remove GetLeakNode. This isn't the right approach.Ted Kremenek2009-04-071-57/+1
| | | | llvm-svn: 68502
* Eagerly compute the leak location when a leak occurs at the end of a path.Ted Kremenek2009-04-071-62/+60
| | | | llvm-svn: 68496
* retain/release checker: When hunting for the leak location, don't walk theTed Kremenek2009-04-071-1/+30
| | | | | | | ExplodedGraph backwards. That may inadvertently result in reverse control-flow edges in the PathDiagostic. llvm-svn: 68477
* Sentence-case bug type.Ted Kremenek2009-04-031-1/+1
| | | | llvm-svn: 68406
* retain/release checker: don't track NSPanel until we have better reasoning aboutTed Kremenek2009-04-031-2/+8
| | | | | | the subtle ownership issues of such objects. llvm-svn: 68397
* Fix grammar.Ted Kremenek2009-04-021-1/+1
| | | | llvm-svn: 68282
* Title-case the names of bug types.Ted Kremenek2009-04-021-7/+8
| | | | llvm-svn: 68274
* - Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocationTed Kremenek2009-04-011-9/+6
| | | | | | | | | instead of a FullSourceLoc. This resulted in a bunch of small edits in various clients. - Updated BugReporter to include an alternate PathDiagnostic generation algorithm for PathDiagnosticClients desiring more control-flow pieces. llvm-svn: 68193
* analyzer infrastructure: make a bunch of changes to symbolic expressions thatTed Kremenek2009-03-261-10/+10
| | | | | | | | | | | | | | | | Zhongxing and I discussed by email. Main changes: - Removed SymIntConstraintVal and SymIntConstraint - Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr - Added nonloc::SymExprVal to wrap SymExpr - SymbolRef is now just a typedef of 'const SymbolData*' - Bunch of minor code cleanups in how some methods were invoked (no functionality change) This changes are part of a long-term plan to have full symbolic expression trees. This will be useful for lazily evaluating complicated expressions. llvm-svn: 67731
* retain/release checker: Tracking autorelease counts for objects. We're still notTed Kremenek2009-03-201-7/+48
| | | | | | completely there with accurately modeling autorelease pools. llvm-svn: 67384
* Stub out some code for support for NSDeallocateObject. This is enabled yet untilTed Kremenek2009-03-171-0/+12
| | | | | | we resolve the semantics of this function when GC is enabled. llvm-svn: 67116
* retain/release checker: Add support for reasoning about -dealloc.Ted Kremenek2009-03-171-35/+128
| | | | llvm-svn: 67094
* Fix PR 3677 [retain checker]: custom 'allocWithZone' methods should be allowedTed Kremenek2009-03-131-3/+6
| | | | | | to return an owning pointer. llvm-svn: 66934
* Remove '[naming convention]' from bug type.Ted Kremenek2009-03-111-2/+2
| | | | llvm-svn: 66739
* retain/release checker: Allow allocations to fail by returning nil.Ted Kremenek2009-03-091-1/+5
| | | | llvm-svn: 66487
* Create PathDiagnosticPiece subclasses PathDiagnosticEventPiece andTed Kremenek2009-03-061-3/+3
| | | | | | | | PathDiagnosticControlFlowPiece to distinguish (in the class hierarchy) between events and control-flow diagnostic pieces. Clients must now use these directly when constructing PathDiagnosticPieces. llvm-svn: 66310
* Minor tweak: Recognize 'CGCF' prefix in addition to 'CF' and 'CG'.Ted Kremenek2009-03-051-1/+11
| | | | llvm-svn: 66208
* BasicStore:Ted Kremenek2009-03-051-3/+4
| | | | | | | | | | | | | - Store bindings using a MemRegion -> SVal binding instead of VarDecl -> SVal binding. This mirrors some of the idea of RegionStore, but is far simpler and not nearly as functional. This leads to some code simplification and some potential for some minor precision hacks. Along the way... - constify the use of MemRegion* in a few places - add operator<<(llvm::raw_ostream, const MemRegion*) llvm-svn: 66163
* Fix message titleTed Kremenek2009-03-051-1/+1
| | | | llvm-svn: 66110
* For now, do not track NSWindow objects and it's subclasses.Ted Kremenek2009-03-041-0/+13
| | | | llvm-svn: 66107
* Add prototype support for invalidating fields for structures passed-by-referenceTed Kremenek2009-03-041-18/+71
| | | | | | | to unknown functions. Most of this logic should be eventually moved to RegionStore and be made lazy. llvm-svn: 66094
* Added the notion of a "boundable region", which is a region that can have a ↵Ted Kremenek2009-03-041-1/+1
| | | | | | direct binding in the StoreManager. llvm-svn: 66005
* Use GetSValAsScalarOrLoc instead of GetSVal to prevent unintended structure ↵Ted Kremenek2009-03-041-16/+16
| | | | | | or array "loads". llvm-svn: 65983
* Rework use of loc::SymbolVal in the retain/release checker to use the new methodTed Kremenek2009-03-031-64/+39
| | | | | | | | | | | SVal::getAsLocSymbol(). This simplifies the code and allows the retain/release checker to (I believe) also correctly reason about location symbols wrapped in SymbolicRegions. Along the way I cleaned up SymbolRef a little, disallowing implicit casts to 'unsigned'. llvm-svn: 65972
* Rename AnonTypedRegion to TypedViewRegion.Ted Kremenek2009-03-011-2/+2
| | | | llvm-svn: 65764
* Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor2009-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... llvm-svn: 65591
* Refine some grammar in the retain/release diagnostics.Ted Kremenek2009-02-261-21/+15
| | | | llvm-svn: 65571
* Fix recently introduced switch case fallthrough bug.Ted Kremenek2009-02-251-4/+4
| | | | llvm-svn: 65485
* retain/release checker: Implement basic tracking of autorelease stack. Next ↵Ted Kremenek2009-02-251-6/+26
| | | | | | thing is to wire up pools with their contents. llvm-svn: 65425
* Fix broken logic from my last commit. Branches only occur at basic blocks ↵Ted Kremenek2009-02-241-1/+1
| | | | | | that end with terminators. llvm-svn: 65410
* Fix diagnostic regression where the leak diagnostic could appear earlier in ↵Ted Kremenek2009-02-241-1/+11
| | | | | | the path than the branches taken. llvm-svn: 65407
* retain/release checker:Ted Kremenek2009-02-241-70/+38
| | | | | | | | | | | | - For autorelease pool tracking, keep information about the stack of pools separate from their contents. Also, keep track of the number of times an autorelease pool will send the "release" message to an object when the pool is destroyed. - Update CFRefCount::Update to return a new state instead of a reference count binding. This will allow us to implement more complicated semantics with autorelease pools. llvm-svn: 65384
* Add more boilerplate logic to more accurately reason about autorelease pools.Ted Kremenek2009-02-231-4/+52
| | | | | | | This doesn't change the current functionality, but better codifies the autorelease pool stack itself. llvm-svn: 65328
* Fix 80 col. violations.Ted Kremenek2009-02-231-2/+4
| | | | llvm-svn: 65322
* Per Chris L.'s suggestion, use getAsFunctionType() instead of ↵Ted Kremenek2009-02-231-5/+7
| | | | | | getDesguaredType(). Constify some pointers along the way. llvm-svn: 65321
* retain/release checker: For now don't track the retain count of NSWindow ↵Ted Kremenek2009-02-231-1/+5
| | | | | | objects (opt for false negatives). llvm-svn: 65304
* Remove typo.Ted Kremenek2009-02-231-1/+1
| | | | llvm-svn: 65302
* '[NSAutoreleasePool addObject:]' has an 'autorelease' effect, not a ↵Ted Kremenek2009-02-231-2/+2
| | | | | | DoNothing effect. llvm-svn: 65301
* Fix regression in naming convention derivation: a method only follows the ↵Ted Kremenek2009-02-221-1/+1
| | | | | | copy 'rule' if it doesn't already start with 'init', etc. llvm-svn: 65269
OpenPOWER on IntegriCloud