Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add getSize() support for StringRegion. | Zhongxing Xu | 2008-11-24 | 1 | -3/+2 | |
| | | | | llvm-svn: 59930 | |||||
* | Clean up code by using utility methods. | Zhongxing Xu | 2008-11-23 | 1 | -11/+7 | |
| | | | | llvm-svn: 59899 | |||||
* | Remove debug code. | Zhongxing Xu | 2008-11-22 | 1 | -1/+1 | |
| | | | | llvm-svn: 59870 | |||||
* | Initial support for checking out of bound memory access. Only support | Zhongxing Xu | 2008-11-22 | 1 | -0/+36 | |
| | | | | | | ConcreteInt index for now. llvm-svn: 59869 | |||||
* | Add support for symbolicating global structs and arrays in ↵ | Zhongxing Xu | 2008-11-19 | 1 | -1/+78 | |
| | | | | | | RegionStoreManager::getInitialStore(). llvm-svn: 59619 | |||||
* | Fix warning about RegionStoreManager::Retrieve() not always returning a value. | Ted Kremenek | 2008-11-19 | 1 | -1/+1 | |
| | | | | llvm-svn: 59571 | |||||
* | handle the case that the array element is of structure type when bind the ↵ | Zhongxing Xu | 2008-11-18 | 1 | -1/+4 | |
| | | | | | | whole array to a single value (for example, UnknownVal, UndefinedVal). llvm-svn: 59521 | |||||
* | Enhance modularization: return a <state,loc> pair to let GRExprEngine modify the | Zhongxing Xu | 2008-11-16 | 1 | -10/+8 | |
| | | | | | | environment. llvm-svn: 59407 | |||||
* | Enhances SCA to process untyped region to typed region conversion. | Zhongxing Xu | 2008-11-16 | 1 | -1/+67 | |
| | | | | | | | | | | | | - 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 | |||||
* | Improve zero value generation. | Zhongxing Xu | 2008-11-15 | 1 | -2/+1 | |
| | | | | llvm-svn: 59356 | |||||
* | Process array base expression of any type. | Zhongxing Xu | 2008-11-13 | 1 | -0/+8 | |
| | | | | llvm-svn: 59240 | |||||
* | Array index might be unsigned. We have to generate a temporary signed value for | Zhongxing Xu | 2008-11-13 | 1 | -0/+12 | |
| | | | | | | it to be evaluated by APSInt::operators. llvm-svn: 59238 | |||||
* | Incomplete struct pointer can be used as a function argument. | Zhongxing Xu | 2008-11-13 | 1 | -1/+7 | |
| | | | | llvm-svn: 59235 | |||||
* | StoreManager::BindDecl now takes an SVal* for the initialization value ↵ | Ted Kremenek | 2008-11-12 | 1 | -23/+15 | |
| | | | | | | instead of an Expr* (which can be null). Lazy symbolication of conjured symbols is now the sole responsibility of GRExprEngine. llvm-svn: 59151 | |||||
* | Implement RegionStoreManager::RemoveDeadBindings(). This prunes several ↵ | Zhongxing Xu | 2008-11-10 | 1 | -4/+20 | |
| | | | | | | false warning caused by removal of symbolic constraints. Currently we just mark all symbols live. Further optimization for dead binding removal needed. llvm-svn: 58982 | |||||
* | Finish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is | Zhongxing Xu | 2008-11-07 | 1 | -9/+17 | |
| | | | | | | | | | available, things get much simplified. One addition is that CompoundLiteralExpr can appear both in rvalue and lvalue context. llvm-svn: 58837 | |||||
* | Make the assertion real. | Zhongxing Xu | 2008-11-07 | 1 | -1/+1 | |
| | | | | llvm-svn: 58833 | |||||
* | 1. When a pointer to struct is used as an argument, GRSimpleVals::EvalCall() | Zhongxing Xu | 2008-11-02 | 1 | -18/+23 | |
| | | | | | | | | | | | sets the whole struct to Unknown. Then we cannot assume the V passed to BindStruct() is always a CompoundVal. When it is an UnknownVal, we call BindStructToVal(UnknownVal). 2. Change the signature of InitializeStructToUndefined() to BindStructToVal() to reuse the code. llvm-svn: 58564 | |||||
* | Simplify interface. We can get canonical type from the base region directly. ↵ | Zhongxing Xu | 2008-10-31 | 1 | -21/+23 | |
| | | | | | | No need for an extra type argument. llvm-svn: 58507 | |||||
* | Implement struct initialization for SCA. | Zhongxing Xu | 2008-10-31 | 1 | -1/+47 | |
| | | | | llvm-svn: 58506 | |||||
* | Implement array initialization for SCA. | Zhongxing Xu | 2008-10-31 | 1 | -6/+39 | |
| | | | | llvm-svn: 58504 | |||||
* | Implement BindStruct and fix a bug in RetriveStruct. | Zhongxing Xu | 2008-10-31 | 1 | -4/+33 | |
| | | | | llvm-svn: 58496 | |||||
* | Implement load from struct region. Instead of returning an UnknownVal(), we ↵ | Zhongxing Xu | 2008-10-31 | 1 | -0/+33 | |
| | | | | | | create a CompoundVal by loading from each field of the struct. llvm-svn: 58494 | |||||
* | Rename: AddDecl => BindDecl | Zhongxing Xu | 2008-10-29 | 1 | -5/+4 | |
| | | | | | | | | BindDecl better describes what the function does: - Bind the VarDecl to its memory region - Bind the memory region to some initial value. llvm-svn: 58359 | |||||
* | Added preliminary support for CompoundLiterals in the static analyzer: | Ted Kremenek | 2008-10-27 | 1 | -0/+9 | |
| | | | | | | | | | | | | | | | | | | | | - GRExprEngine::VisitCompoundLiteral... (1) visits the initializer list (generating ExplodedNodes) (2) creates a CompoundMemRegion for the literal (3) creates a new state with the bound literal values using GRStateManager::BindCompoundLiteral - GRStateManager::BindCompoundLiteral simply calls StoreManager::BindCompoundLiteral to get a new store and returns a persistent GRState with that store. - BasicStore::BindCompoundLiteral simply returns the same store, as it doesn't handle field sensitivity - RegionStore::BindCompoundLiteral currently fires an assert (pending discussion of how to best implement mappings for CompoundLiteralRegion). llvm-svn: 58277 | |||||
* | Use ASTContext::getCanonicalType() to get TypedRegion's type. | Zhongxing Xu | 2008-10-27 | 1 | -1/+1 | |
| | | | | llvm-svn: 58247 | |||||
* | We cannot get precise lvalue for symbolic base array region. | Zhongxing Xu | 2008-10-27 | 1 | -0/+3 | |
| | | | | llvm-svn: 58243 | |||||
* | Get the canonical type for struct initialization. The original code would ↵ | Zhongxing Xu | 2008-10-27 | 1 | -1/+5 | |
| | | | | | | crash on TypedefType. llvm-svn: 58236 | |||||
* | Remove loc::StringLiteralVal. Now we allocate regions for string literals in ↵ | Zhongxing Xu | 2008-10-26 | 1 | -4/+0 | |
| | | | | | | the Store. llvm-svn: 58182 | |||||
* | Simplify ArrayToPointer conversion. Actually the only thing we need to do is ↵ | Zhongxing Xu | 2008-10-26 | 1 | -29/+5 | |
| | | | | | | to get the first element region. It is not necessary to care about the kind of the base array region. llvm-svn: 58181 | |||||
* | Add code for get the lvalue for string literals. Now we return a StringRegion | Zhongxing Xu | 2008-10-25 | 1 | -3/+16 | |
| | | | | | | | for StringLiteral lvalue evaluation, instead of directly returning a loc::StringLiteralVal by the Environment. llvm-svn: 58138 | |||||
* | Added method "getSelfRegion" to Store. This method returns the region ↵ | Ted Kremenek | 2008-10-24 | 1 | -0/+8 | |
| | | | | | | associated with the "this" or "self" object (C++ and Objective-C respectively). llvm-svn: 58107 | |||||
* | The Decl of an array region can be VarDecl or FieldDecl. Handle this in ↵ | Zhongxing Xu | 2008-10-24 | 1 | -2/+10 | |
| | | | | | | RegionStoreManager::ArrayToPointer(). llvm-svn: 58086 | |||||
* | Implement struct initialization. Make it into a recursive function. Also make | Zhongxing Xu | 2008-10-24 | 1 | -24/+63 | |
| | | | | | | the array initialization code into a function. llvm-svn: 58083 | |||||
* | Add printing method to RegionStoreManager. | Zhongxing Xu | 2008-10-24 | 1 | -3/+11 | |
| | | | | llvm-svn: 58074 | |||||
* | Fix 80-col violation. | Zhongxing Xu | 2008-10-24 | 1 | -3/+5 | |
| | | | | llvm-svn: 58070 | |||||
* | Add a bunch of dummy methods to make RegionStoreManager non-virtual. | Zhongxing Xu | 2008-10-24 | 1 | -3/+29 | |
| | | | | llvm-svn: 58061 | |||||
* | Added getLValueElement() to RegionStore. Only handle constant array for now. | Zhongxing Xu | 2008-10-24 | 1 | -0/+54 | |
| | | | | llvm-svn: 58058 | |||||
* | Make the analyzer store (memory model) a command line option. | Ted Kremenek | 2008-10-24 | 1 | -0/+5 | |
| | | | | llvm-svn: 58056 | |||||
* | Add a bunch of getLValue* methods to RegionStore. | Zhongxing Xu | 2008-10-22 | 1 | -0/+54 | |
| | | | | llvm-svn: 57977 | |||||
* | Preliminary support for function overloading | Douglas Gregor | 2008-10-21 | 1 | -2/+2 | |
| | | | | llvm-svn: 57909 | |||||
* | Modify Store interface: GetSVal/SetSVal => Retrieve/Bind. | Zhongxing Xu | 2008-10-21 | 1 | -12/+12 | |
| | | | | llvm-svn: 57896 | |||||
* | Process decls in RegionStore. Individual elements of fixed size arrays are | Zhongxing Xu | 2008-10-21 | 1 | -2/+115 | |
| | | | | | | initialized to UndefinedVal. llvm-svn: 57892 | |||||
* | - constify some uses of MemRegion* (MemRegion should be immutable). | Ted Kremenek | 2008-10-17 | 1 | -1/+1 | |
| | | | | | | | | | - 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 patch did the following renaming. There should be no functional changes. | Zhongxing Xu | 2008-10-17 | 1 | -9/+9 | |
| | | | | | | | | | | RVal => SVal LVal => Loc NonLVal => NonLoc lval => loc nonlval => nonloc llvm-svn: 57671 | |||||
* | This is the first step to implement a field-sensitive store model. Other ↵ | Zhongxing Xu | 2008-10-08 | 1 | -0/+96 | |
things are simplified: no heap shape assumption, no parameter alias assumption, etc. llvm-svn: 57285 |