Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Change RegionStoreManager::Retrieve to infer the type of a symbolic region ↵ | Tom Care | 2010-06-25 | 1 | -1/+6 | |
| | | | | | | from the context when it is not already available. llvm-svn: 106868 | |||||
* | Correctly construct an ElementRegion for alloca() + pointer arithmetic. ↵ | Ted Kremenek | 2010-06-22 | 1 | -2/+1 | |
| | | | | | | | | Fixes analyzer crash reported in PR 7450. llvm-svn: 106609 | |||||
* | Implement RegionStoreManager::iterBindings(). This implementation only ↵ | Ted Kremenek | 2010-06-17 | 1 | -6/+11 | |
| | | | | | | | | | | returns the base region in the binding key instead of the region + offset. It isn't clear if this is the best semantics, but most clients will likely only care about simple bindings, or bindings to a particular variable. We can refine later if necessary. llvm-svn: 106183 | |||||
* | Limit the use of BindDefault(). | Zhongxing Xu | 2010-06-01 | 1 | -1/+5 | |
| | | | | llvm-svn: 105265 | |||||
* | Add support for calloc() in MallocChecker. Patch by Jordy Rose, with my | Zhongxing Xu | 2010-06-01 | 1 | -1/+6 | |
| | | | | | | modification. llvm-svn: 105264 | |||||
* | After conversations with Zhongxing Xu and Jordy Rose, refine the logic in | Ted Kremenek | 2010-05-31 | 1 | -19/+25 | |
| | | | | | | | | | RegionStoreManager::RetrieveElement() that handles indexing into a larger scalar object to only consult the direct binding of a super region if it is a scalar. This isn't perfect yet, and a big FIXME is attached to the code. This causes the test case for PR 7218 now to pass. llvm-svn: 105195 | |||||
* | Revert r105097. Thinking about a better fix. | Zhongxing Xu | 2010-05-29 | 1 | -18/+5 | |
| | | | | llvm-svn: 105099 | |||||
* | Fix PR7218. Patch by Jordy Rose. | Zhongxing Xu | 2010-05-29 | 1 | -3/+17 | |
| | | | | llvm-svn: 105097 | |||||
* | Small fix. | Zhongxing Xu | 2010-05-26 | 1 | -1/+1 | |
| | | | | llvm-svn: 104669 | |||||
* | Remove extents of dead symbolic regions when RemoveDeadBindings. | Zhongxing Xu | 2010-05-26 | 1 | -7/+15 | |
| | | | | | | This requires creating new persistent states due to the nature of GDM. llvm-svn: 104668 | |||||
* | CastSizeChecker checks when casting a malloc'ed symbolic region to type T, | Zhongxing Xu | 2010-05-25 | 1 | -7/+12 | |
| | | | | | | | whether the size of the symbolic region is a multiple of the size of T. Fixes PR6123 and PR7217. llvm-svn: 104584 | |||||
* | Introduce Type::isStructureOrClassType(), which does the obvious | Douglas Gregor | 2010-04-26 | 1 | -8/+8 | |
| | | | | | | | | thing. Audit all uses of Type::isStructure(), changing those calls to isStructureOrClassType() as needed (which is alsmost everywhere). Fixes the remaining failure in Boost.Utility/Swap. llvm-svn: 102386 | |||||
* | Analyzer: add support for CXXNewExpr. | Zhongxing Xu | 2010-04-19 | 1 | -10/+0 | |
| | | | | llvm-svn: 101771 | |||||
* | Remove copy of 'Optional' in Clang tree, and convert clients to use the one ↵ | Ted Kremenek | 2010-04-09 | 1 | -9/+9 | |
| | | | | | | now in the LLVM tree. llvm-svn: 100891 | |||||
* | Use the element type to compute the array size when the base region is a ↵ | Zhongxing Xu | 2010-04-01 | 1 | -3/+6 | |
| | | | | | | | | VarRegion. Patch by Jordy Rose. llvm-svn: 100099 | |||||
* | Fix a bug (PR 6699) in RegionStore::RemoveDeadBindings() where | Ted Kremenek | 2010-04-01 | 1 | -32/+31 | |
| | | | | | | array values with a non-zero offset would get prematurely pruned from the store. llvm-svn: 100067 | |||||
* | RegionStore: specially handle loads from integer global variables declared ↵ | Ted Kremenek | 2010-03-30 | 1 | -1/+16 | |
| | | | | | | | | 'const'. Fixes a false positive reported in PR 6288. llvm-svn: 99922 | |||||
* | Use 'const Optional<SVal>&' to avoid an extra copy. | Ted Kremenek | 2010-03-30 | 1 | -8/+8 | |
| | | | | llvm-svn: 99921 | |||||
* | Bind the constructed object value to CXXConstructExpr. | Zhongxing Xu | 2010-03-23 | 1 | -3/+2 | |
| | | | | llvm-svn: 99271 | |||||
* | Mark CXXThisRegion in the current or parent stack frame context as live so that | Zhongxing Xu | 2010-03-17 | 1 | -4/+18 | |
| | | | | | | their bindings are not removed. llvm-svn: 98705 | |||||
* | Add VisitCXXContructExpr logic to the analyzer. This still has not fully worked | Zhongxing Xu | 2010-03-16 | 1 | -9/+22 | |
| | | | | | | since RemoveDeadBinding mistakenly remove the binding to CXXThisRegion. llvm-svn: 98629 | |||||
* | Simplify assertion. | Ted Kremenek | 2010-03-10 | 1 | -5/+1 | |
| | | | | llvm-svn: 98176 | |||||
* | Remove '#if 0' code. Lazy compound values have proven their worth. | Ted Kremenek | 2010-03-10 | 1 | -39/+0 | |
| | | | | llvm-svn: 98175 | |||||
* | Remove the subregion map cache. It is no longer used. | Ted Kremenek | 2010-03-10 | 1 | -8/+0 | |
| | | | | llvm-svn: 98161 | |||||
* | Fix stale comment. | Ted Kremenek | 2010-03-10 | 1 | -1/+1 | |
| | | | | llvm-svn: 98160 | |||||
* | Really apply (unnoticed weird git-svn merge conflict in 98144): Refactor ↵ | Ted Kremenek | 2010-03-10 | 1 | -299/+290 | |
| | | | | | | | | | | | RegionStore::RemoveDeadBindings to use the same core cluster analysis algorithm as RegionStore::InvalidateRegions(). Beyond simplifying the algorithm significantly, we no longer need to build subregion maps in RemoveDeadBindings(). This and other changes cause a significant speedup: the time to analyze sqlite3.c (single core) drops by 14%. llvm-svn: 98159 | |||||
* | Refactor RegionStore::RemoveDeadBindings to use the same core | Ted Kremenek | 2010-03-10 | 1 | -87/+87 | |
| | | | | | | | | | | | cluster analysis algorithm as RegionStore::InvalidateRegions(). Beyond simplifying the algorithm significantly, we no longer need to build subregion maps in RemoveDeadBindings(). This and other changes cause a significant speedup: the time to analyze sqlite3.c (single core) drops by 14%. llvm-svn: 98144 | |||||
* | Refactor some of RegionStore's InvalidateRegionsWorker class | Ted Kremenek | 2010-03-10 | 1 | -62/+86 | |
| | | | | | | | into a 'ClusterAnalysis' parent class. The idea is to potentially reuse this for reworking RemoveDeadBindings. llvm-svn: 98143 | |||||
* | Since now we store the cast type with an ElementRegion, there is | Zhongxing Xu | 2010-03-01 | 1 | -5/+5 | |
| | | | | | | no need to store a type with SymbolRegionValue. llvm-svn: 97437 | |||||
* | Assert when loading from a code text region instead of returning an unknown ↵ | Zhongxing Xu | 2010-03-01 | 1 | -1/+3 | |
| | | | | | | silently. llvm-svn: 97436 | |||||
* | Enhance RegionStore::InvalidateRegions() to correctly invalidate bindings | Ted Kremenek | 2010-02-13 | 1 | -12/+32 | |
| | | | | | | by scanning through the values of LazyCompoundVals. llvm-svn: 96067 | |||||
* | Pull logic for visiting value bindings in InvalidateRegionsWorker into a ↵ | Ted Kremenek | 2010-02-13 | 1 | -20/+28 | |
| | | | | | | | | separate method. No functionality change. llvm-svn: 96060 | |||||
* | Eliminate the ASTContext parameter from RecordDecl::getDefinition() | Douglas Gregor | 2010-02-11 | 1 | -1/+1 | |
| | | | | | | | and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. llvm-svn: 95836 | |||||
* | Add comment. | Zhongxing Xu | 2010-02-10 | 1 | -1/+2 | |
| | | | | llvm-svn: 95755 | |||||
* | Fix lookup of fields from lazy bindings to check if the region is | Ted Kremenek | 2010-02-09 | 1 | -9/+5 | |
| | | | | | | | | NULL, not the store, to determine if a lookup succeeded. The store can be null if it contained no bindings. This fixes a false positive reported to me by a user of the analyzer. llvm-svn: 95679 | |||||
* | Revert 95541. | Ted Kremenek | 2010-02-08 | 1 | -1/+1 | |
| | | | | llvm-svn: 95545 | |||||
* | Rename: GRState::getSVal(Stmt*) => getExprVal(), | Zhongxing Xu | 2010-02-08 | 1 | -1/+1 | |
| | | | | | | GRState::getSVal(MemRegion*) => Load(). llvm-svn: 95541 | |||||
* | Like for symbolic region, automatically create a element zero region for | Zhongxing Xu | 2010-02-08 | 1 | -15/+5 | |
| | | | | | | alloca region. llvm-svn: 95539 | |||||
* | Unify the implementation of getLValueElement of store managers. | Zhongxing Xu | 2010-02-08 | 1 | -57/+0 | |
| | | | | | | | It's more sophisticated than the original one of BasicStore. But it does matter. llvm-svn: 95536 | |||||
* | Unify the implementation of getLValueIvar and getLValueField of store managers. | Zhongxing Xu | 2010-02-08 | 1 | -55/+0 | |
| | | | | llvm-svn: 95535 | |||||
* | Move common methods to the base StoreManager class. | Zhongxing Xu | 2010-02-08 | 1 | -33/+0 | |
| | | | | llvm-svn: 95534 | |||||
* | Also teach RegionStore::RetrieveVar() to handle 'static' pointers that are ↵ | Ted Kremenek | 2010-02-06 | 1 | -1/+3 | |
| | | | | | | implicitly initialized to NULL. llvm-svn: 95479 | |||||
* | Fix regression in RegionStore (from BasicStore) where static variables were ↵ | Ted Kremenek | 2010-02-06 | 1 | -3/+15 | |
| | | | | | | not treated as being implicitly initialized to 0 (and instead were getting symbolicated). llvm-svn: 95478 | |||||
* | Teach RegionStore::InvalidateRegions() to also invalidate static variables ↵ | Ted Kremenek | 2010-02-06 | 1 | -4/+5 | |
| | | | | | | referenced by blocks. llvm-svn: 95459 | |||||
* | More GRState* -> Store changes. | Zhongxing Xu | 2010-02-05 | 1 | -6/+4 | |
| | | | | llvm-svn: 95365 | |||||
* | Remove unused parameter. | Zhongxing Xu | 2010-02-05 | 1 | -4/+2 | |
| | | | | llvm-svn: 95364 | |||||
* | More GRState* -> Store changes. | Zhongxing Xu | 2010-02-05 | 1 | -6/+3 | |
| | | | | llvm-svn: 95362 | |||||
* | More GRState* -> Store changes. | Zhongxing Xu | 2010-02-05 | 1 | -111/+92 | |
| | | | | llvm-svn: 95360 | |||||
* | More GRState* -> Store changes. | Zhongxing Xu | 2010-02-05 | 1 | -31/+26 | |
| | | | | llvm-svn: 95357 | |||||
* | Change LazyCompoundVal to a <Store, MemRegion*> pair. We really don't need to | Zhongxing Xu | 2010-02-05 | 1 | -46/+46 | |
| | | | | | | spread GRState* everywhere. llvm-svn: 95354 |