summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/RegionStore.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* When evaluating pointer arithmetic, if the base location is a symbolic region,Zhongxing Xu2009-05-091-18/+15
| | | | | | | convert it to the first element region. Also do not assume the array region is typed. llvm-svn: 71358
* Do not create a TypedViewRegion when the base struct region is a symbolicZhongxing Xu2009-05-091-4/+0
| | | | | | | region. In the future we may set the cast-to type as the same time. But for now, we simply leave it as it is. llvm-svn: 71357
* Do not layer a TypedViewRegion when casting symbolic or alloca regions.Zhongxing Xu2009-05-091-13/+9
| | | | | | | | | Modify getLValueElement accordingly. Now we don't require base region to be a typed region. Do not create TypedViewRegion when base region is symbolic or alloca region. We can do so because each element region has its type information. llvm-svn: 71355
* Remove the case for casting to compatible type in Zhongxing Xu2009-05-091-10/+2
| | | | | | RegionStoreManager::CastRegion(). This case should be subsumed by others. llvm-svn: 71353
* Rename:Zhongxing Xu2009-05-091-3/+3
| | | | | | | SymbolRegionRValue => SymbolRegionValue SymExpr::RegionRValue => SymExpr::RegionValueKind llvm-svn: 71322
* As discussed with Ted, rename TypedRegion::getObjectType() to Zhongxing Xu2009-05-091-13/+13
| | | | | | TypedRegion::getValueType(). llvm-svn: 71321
* rename: MemRegion:Zhongxing Xu2009-05-091-20/+15
| | | | | | | | | RValueType => ObjectType LValueType => LocationType No functionality change. llvm-svn: 71304
* Fix PR4182.Zhongxing Xu2009-05-081-2/+2
| | | | llvm-svn: 71288
* Region store: when casting VarRegions, if the cast-to pointee type is Zhongxing Xu2009-05-081-0/+8
| | | | | | incomplete, do not compute its size and return the original region. llvm-svn: 71213
* Replace the heuristic isSmallerThan with ASTContext::getTypeSize().Zhongxing Xu2009-05-081-9/+5
| | | | llvm-svn: 71206
* Replace getTypeWidth() with ASTContext::getTypeSize().Zhongxing Xu2009-05-081-44/+5
| | | | llvm-svn: 71205
* Revert r71079.Zhongxing Xu2009-05-081-2/+2
| | | | llvm-svn: 71202
* Improve RegionStoreManager::getSizeInElements()Zhongxing Xu2009-05-061-2/+53
| | | | | | | | - add a static function getTypeWidth(), which computes the width of a type with the help of TargetInfo. - no-outofbounds.c now passes for region store. llvm-svn: 71080
* Add a GDM for recording the cast type of regions.Zhongxing Xu2009-05-061-2/+25
| | | | llvm-svn: 71076
* Implement a heuristic type size comparison method for now.Zhongxing Xu2009-05-061-3/+19
| | | | llvm-svn: 71074
* remove commented code.Zhongxing Xu2009-05-061-8/+0
| | | | llvm-svn: 71060
* Make StoreManager::CastRegion() virtual and implement a new CastRegion() forZhongxing Xu2009-05-061-0/+80
| | | | | | | | | RegionStore. This CastRegion() performs casts according to the kind of the region being cast instead of the type that is cast to. llvm-svn: 71058
* Per conversations with Zhongxing, add an 'element type' toTed Kremenek2009-05-041-17/+27
| | | | | | | | | | | | | | | | | | | ElementRegion. I also removed 'ElementRegion::getArrayRegion', although we may need to add this back. This breaks a few test cases with RegionStore: - 'array-struct.c' triggers an infinite recursion in RegionStoreManager. Need to investigate. - misc-ps.m triggers a failure with RegionStoreManager as we now get the diagnostic: 'Line 159: Uninitialized or undefined return value returned to caller.' There were a bunch of places that needed to be edit RegionStoreManager, and we may not be passing all the correct 'element types' down from GRExprEngine. Zhongxing: When you get a chance, could you review this? I could have easily screwed up something basic in RegionStoreManager. llvm-svn: 70830
* region store: make Retrieve() can retrieve embedded array correctly. AlsoZhongxing Xu2009-05-031-19/+30
| | | | | | simplify the retrieve logic. llvm-svn: 70651
* SymbolicRegions may also be live roots.Zhongxing Xu2009-04-291-0/+4
| | | | llvm-svn: 70380
* Refactor 'BasicStoreManager::CastRegion' and 'RegionStoreManager::CastRegion'Ted Kremenek2009-04-211-34/+2
| | | | | | | | into StoreManager::CastRegion. Both methods were practically identical, and this is core logic that is common to all StoreManagers since it defines the basic invariants of the abstract memory model. llvm-svn: 69730
* Remove loc::FuncVal.Zhongxing Xu2009-04-201-6/+0
| | | | llvm-svn: 69577
* Finally nuke loc::SymbolVal.Zhongxing Xu2009-04-101-40/+5
| | | | llvm-svn: 68771
* - Move ownership of MemRegionManager into ValueManager.Ted Kremenek2009-04-091-7/+5
| | | | | | | - 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/+4
| | | | | | No functionality change (really). llvm-svn: 68726
* This is the first step to gradually remove the use of loc::SymbolVal. NowZhongxing Xu2009-04-031-11/+32
| | | | | | | | when creating symbolic values, we distinguish between location and non-location values. For location values, we create a symbolic region instead of a loc::SymbolVal. llvm-svn: 68373
* Re-apply 68028. The code had drifted enough that the tests would fail withoutTed Kremenek2009-03-301-5/+14
| | | | | | it. Will discuss offline whether symbolic regions should by typed or typeless. llvm-svn: 68070
* Revert 68028.Ted Kremenek2009-03-301-14/+5
| | | | llvm-svn: 68068
* Make SymbolicRegion untyped.Zhongxing Xu2009-03-301-5/+14
| | | | | | Layer the type information with a TypedViewRegion on top of the SymbolicRegion. llvm-svn: 68028
* Implement a FIXME.Zhongxing Xu2009-03-301-7/+2
| | | | llvm-svn: 68024
* remove dead code.Zhongxing Xu2009-03-271-4/+0
| | | | llvm-svn: 67825
* analyzer infrastructure: make a bunch of changes to symbolic expressions thatTed Kremenek2009-03-261-9/+5
| | | | | | | | | | | | | | | | 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
* Use a work list to recursively build up the subregion mapping, and mark liveZhongxing Xu2009-03-181-9/+17
| | | | | | var region roots. llvm-svn: 67152
* Updated comment.Ted Kremenek2009-03-131-0/+2
| | | | llvm-svn: 66894
* Fix failure reported by Sebastian of test/Analysis/ptr-arith.c when the targetTed Kremenek2009-03-131-6/+7
| | | | | | | | | | is 64-bit. I used his suggestion of doing a direct bitwidth/signedness conversion of the 'offset' instead of just changing the sign. For more information, see: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-March/004587.html llvm-svn: 66892
* Use getAsRecordType() to get around sugar types.Zhongxing Xu2009-03-121-1/+1
| | | | llvm-svn: 66768
* Do not stipulate the record type is a definition in BindStruct().Zhongxing Xu2009-03-111-1/+3
| | | | llvm-svn: 66654
* Fix crash when LHS of pointer arithmetic is not ElementRegion.Zhongxing Xu2009-03-111-3/+15
| | | | llvm-svn: 66649
* RegionStore::getLValueElement: Handle the case where the signedness of theTed Kremenek2009-03-111-2/+6
| | | | | | | | offset may be different that the base. Ultimately we need a better solution for these issues, but this point-by-point fixes are gradually outlining the scope of the problem. llvm-svn: 66638
* RegionStore::getElementLValue(): Handle the case where the base is a null ↵Ted Kremenek2009-03-091-1/+5
| | | | | | pointer. llvm-svn: 66486
* Only track integer and pointer values.Zhongxing Xu2009-03-091-2/+5
| | | | llvm-svn: 66419
* Now we do not retrieve untyped regions.Zhongxing Xu2009-03-091-8/+7
| | | | llvm-svn: 66418
* Fix a serious bug in RegionStore: we got the new state with new store fromZhongxing Xu2009-03-091-4/+2
| | | | | | Bind() and BindStruct(), but we returned a state with the old store. llvm-svn: 66409
* Add initial support for tracking ivars, with special handling for ivars of ↵Ted Kremenek2009-03-051-8/+33
| | | | | | 'self'. llvm-svn: 66133
* RegionStore: Handle implicit parameters.Ted Kremenek2009-03-041-3/+5
| | | | llvm-svn: 65987
* RegionStore::RemoveDeadBindings needs to check all the symbols of the super ↵Ted Kremenek2009-03-041-0/+20
| | | | | | region of a scanned region as well. llvm-svn: 65981
* Don't use std::auto_ptr with getSubRegionMap().Ted Kremenek2009-03-031-4/+3
| | | | llvm-svn: 65957
* Implement FIXME: GRStateManager::scanReachableSymbols now supports scanning ↵Ted Kremenek2009-03-031-8/+9
| | | | | | MemRegions. llvm-svn: 65919
* Add StoreManager::getSubRegionMap(). This method returns an opaque mapping ↵Ted Kremenek2009-03-031-0/+45
| | | | | | for clients of StoreManagers from MemRegions to their subregions. llvm-svn: 65914
* remove an implemented fixme.Zhongxing Xu2009-03-021-2/+0
| | | | llvm-svn: 65817
OpenPOWER on IntegriCloud