summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/BasicStore.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis2010-12-221-593/+0
| | | | | | libclangGRCore llvm-svn: 122421
* [analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis2010-12-221-1/+1
| | | | llvm-svn: 122420
* Merge ValueManager into SValBuilder.Ted Kremenek2010-12-021-14/+14
| | | | llvm-svn: 120696
* Adjust method calls to reflect name changes inTed Kremenek2010-11-241-5/+5
| | | | | | | | | | ImmutableSet/ImmtuableMap/ImmutableList APIs. Along the way, clean up some method names in the static analyzer so that they are more descriptive and/or start with lowercase letters. llvm-svn: 120071
* Added mapping from 'this' to it's SymbolicRegion in ↵Marcin Swiderski2010-11-171-0/+9
| | | | | | BasicStoreManager::getInitialStore. llvm-svn: 119467
* Basic support for C++ in BasicStore:Marcin Swiderski2010-11-161-6/+11
| | | | | | | - CXXThisRegion treated like VarRegion and ObjCIVarRegion in various places, - Reference treated like pointer in BindDeclInternal. llvm-svn: 119333
* RegionStore/BasicStore: do not return UndefinedVal for accesses to concrete ↵Ted Kremenek2010-11-111-4/+3
| | | | | | | | | | addresses; instead return UnknownVal. This leads it up to checkers (e.g., DereferenceChecker) to guard against illegal accesses (e.g., null dereferences). Fixes PR 5272 and <rdar://problem/6839683>. llvm-svn: 118852
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-2/+2
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* Remove dead code. Patch by Jon Mulder!Jordy Rose2010-08-191-5/+0
| | | | llvm-svn: 111541
* StoreManager::RemoveDeadBindings() can take a Store instead of an entire ↵Zhongxing Xu2010-08-151-7/+4
| | | | | | GRState now. llvm-svn: 111103
* Remove redundant method.Zhongxing Xu2010-08-151-5/+1
| | | | llvm-svn: 111099
* Add a callback for when region changes occur. Still somewhat of a ↵Jordy Rose2010-08-141-6/+11
| | | | | | work-in-progress, but working! Effect on clients: all changes to a store now go through GRState. llvm-svn: 111078
* MemRegion can refer to ASTContext without external help.Zhongxing Xu2010-08-111-4/+4
| | | | llvm-svn: 110784
* Explicitly guard in BasicStore from storing to non-scalars.Ted Kremenek2010-07-291-5/+3
| | | | llvm-svn: 109708
* constify.Zhongxing Xu2010-07-201-2/+2
| | | | llvm-svn: 108801
* Fix PR 7475 by enhancing the static analyzer to also invalidate bindings for ↵Ted Kremenek2010-07-011-6/+84
| | | | | | | | | | | non-static global variables when calling a function/method whose impact on global variables we cannot accurately estimate. This change introduces two new MemSpaceRegions that divide up the memory space of globals, and causes RegionStore and BasicStore to consult a binding to the NonStaticGlobalsMemSpaceRegion when lazily determining the value of a global. llvm-svn: 107423
* Add an ivar to SymbolReaper for the current statement, and then stop passing ↵Jordy Rose2010-07-011-3/+3
| | | | | | the current statement around everywhere. Preparation for symbolic extents. llvm-svn: 107422
* Correctly return early from BasicStoreManager::iterBindings() when the ↵Ted Kremenek2010-06-171-1/+2
| | | | | | BindingsHandler returns false. llvm-svn: 106182
* Remove extents of dead symbolic regions when RemoveDeadBindings.Zhongxing Xu2010-05-261-3/+5
| | | | | | This requires creating new persistent states due to the nature of GDM. llvm-svn: 104668
* Introduce Type::isStructureOrClassType(), which does the obviousDouglas Gregor2010-04-261-1/+1
| | | | | | | | 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
* Mark CXXThisRegion in the current or parent stack frame context as live so thatZhongxing Xu2010-03-171-1/+4
| | | | | | their bindings are not removed. llvm-svn: 98705
* Enhance basic store to also lazily symbolicate VarRegionsTed Kremenek2010-03-101-1/+2
| | | | | | with an 'unknown' memory space. llvm-svn: 98110
* [CFG]Ted Kremenek2010-03-021-19/+29
| | | | | | | | | | | | | | | | | | | After discussion with Zhongxing, don't force the initializer of DeclStmts to be block-level expressions. This led to some interesting fallout: [UninitializedValues] Always visit the initializer of DeclStmts (do not assume they are block-level expressions). [BasicStore] With initializers of DeclStmts no longer block-level expressions, this causes self-referencing initializers (e.g. 'int x = x') to no longer cause the initialized variable to be live before the DeclStmt. While this is correct, it caused BasicStore::RemoveDeadBindings() to prune off the values of these variables from the initial store (where they are set to uninitialized). The fix is to back-port some (and only some) of the lazy-binding logic from RegionStore to BasicStore. Now the default values of local variables are determined lazily as opposed to explicitly initialized. llvm-svn: 97591
* Since now we store the cast type with an ElementRegion, there isZhongxing Xu2010-03-011-3/+3
| | | | | | no need to store a type with SymbolRegionValue. llvm-svn: 97437
* BindInternal is redundant. Remove it.Zhongxing Xu2010-02-081-14/+9
| | | | llvm-svn: 95540
* Unify the implementation of getLValueElement of store managers.Zhongxing Xu2010-02-081-55/+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 Xu2010-02-081-48/+0
| | | | llvm-svn: 95535
* Move common methods to the base StoreManager class.Zhongxing Xu2010-02-081-11/+0
| | | | llvm-svn: 95534
* More GRState* -> Store changes.Zhongxing Xu2010-02-051-8/+5
| | | | llvm-svn: 95365
* More GRState* -> Store changes.Zhongxing Xu2010-02-051-1/+1
| | | | llvm-svn: 95362
* More GRState* -> Store changes.Zhongxing Xu2010-02-051-24/+19
| | | | llvm-svn: 95360
* More GRState* -> Store changes.Zhongxing Xu2010-02-051-4/+4
| | | | llvm-svn: 95357
* Now that CastRetrievedVal returns SVal, there is no need to use CastResult.Zhongxing Xu2010-02-041-12/+8
| | | | llvm-svn: 95279
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-0/+625
(1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. llvm-svn: 94406
OpenPOWER on IntegriCloud