summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/MemRegion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fold assertion into second valid else branch. This removes a compiler warningTed Kremenek2008-11-171-3/+2
| | | | | | | | where the control reaches the end of a non-void function and also allows the compiler to generate better code. When this assertion is false we can easily add more else cases. llvm-svn: 59468
* Enhances SCA to process untyped region to typed region conversion.Zhongxing Xu2008-11-161-1/+25
| | | | | | | | | | | | - RegionView and RegionViewMap is introduced to assist back-mapping from super region to subregions. - GDM is used to carry RegionView information. - AnonTypedRegion is added to represent a typed region introduced by pointer casting. Later AnonTypedRegion can be used in other similar cases, e.g., malloc()'ed region. - The specific conversion is delegated to store manager. llvm-svn: 59382
* Change AllocaRegion to subclass TypedRegion. We need to know ElementRegion'sZhongxing Xu2008-11-131-2/+12
| | | | | | type when assigning to it. llvm-svn: 59229
* Fix StringLiteral print bug.Zhongxing Xu2008-11-111-1/+17
| | | | llvm-svn: 59015
* Add pretty printing to StringRegion.Zhongxing Xu2008-11-101-0/+4
| | | | llvm-svn: 58985
* - Remove AnonTypedRegion, which is not to be used.Zhongxing Xu2008-11-031-15/+9
| | | | | | - Prepare AnonPointeeRegioin for later use. llvm-svn: 58595
* Added AllocaRegion, which represents regions created by calls to alloca().Ted Kremenek2008-11-021-2/+35
| | | | llvm-svn: 58551
* Pull determination of the super region for a VarRegion into a single ↵Ted Kremenek2008-10-271-2/+5
| | | | | | getVarRegion() method. This provides a common clean API for clients. llvm-svn: 58272
* Added CompoundLiteralRegion to represent the (temporary) memory allocated ↵Ted Kremenek2008-10-271-0/+41
| | | | | | for a compound literal. llvm-svn: 58270
* An ElementRegion is really a typed region. Its super region's type has to be ↵Zhongxing Xu2008-10-271-0/+7
| | | | | | ArrayType. llvm-svn: 58245
* Add StringRegion to MemRegions.Zhongxing Xu2008-10-251-0/+27
| | | | llvm-svn: 58137
* Added region ObjCObjectRegion that represents an instance of an Objective-C ↵Ted Kremenek2008-10-241-0/+21
| | | | | | object. llvm-svn: 58106
* Add printing method to ElementRegion.Zhongxing Xu2008-10-241-0/+5
| | | | llvm-svn: 58077
* Add ElementRegion to represent memory chunks for array elements.Zhongxing Xu2008-10-211-0/+28
| | | | llvm-svn: 57891
* Add pretty-printing support for FieldRegions.Ted Kremenek2008-10-171-0/+5
| | | | llvm-svn: 57724
* - constify some uses of MemRegion* (MemRegion should be immutable).Ted Kremenek2008-10-171-7/+49
| | | | | | | | | - Added new region "SymbolicRegion", which maps symbol values to the region domain. - Enhanced BasicStore::getFieldLValue() to return a FieldRegion (using SymbolicRegion) - Added some utility methods to GRState for fetch svals from the store. - Fixed regression in CheckNSError (we weren't getting the value bound to the parameter) llvm-svn: 57717
* This is the first step to implement a field-sensitive store model. Other ↵Zhongxing Xu2008-10-081-0/+34
| | | | | | things are simplified: no heap shape assumption, no parameter alias assumption, etc. llvm-svn: 57285
* Fix typos.Zhongxing Xu2008-10-061-2/+2
| | | | llvm-svn: 57146
* This is a big patch, but the functionality change is small and the rest of ↵Ted Kremenek2008-10-041-0/+158
the patch consists of deltas due to API changes. This patch overhauls the "memory region" abstraction that was prototyped (but never really used) as part of the Store.h. This patch adds MemRegion.h and MemRegion.cpp, which defines the class MemRegion and its subclasses. This classes serve to define an abstract representation of memory, with regions being layered on other regions to to capture the relationships between fields and variables, variables and the address space they are allocated in, and so on. The main motivation of this patch is that key parts of the analyzer assumed that all value bindings were to VarDecls. In the future this won't be the case, and this patch removes lval::DeclVal and replaces it with lval::MemRegionVal. Now all pieces of the analyzer must reason about abstract memory blocks instead of just variables. There should be no functionality change from this patch, but it opens the door for significant improvements to the analyzer such as field-sensitivity and object-sensitivity, both which were on hold until the memory abstraction got generalized. The memory region abstraction also allows type-information to literally be affixed to a memory region. This will allow the some now redundant logic to be removed from the retain/release checker. llvm-svn: 57042
OpenPOWER on IntegriCloud