summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/Store.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis2010-12-221-333/+0
| | | | | | libclangGRCore llvm-svn: 122421
* [analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis2010-12-221-2/+2
| | | | llvm-svn: 122420
* Merge ValueManager into SValBuilder.Ted Kremenek2010-12-021-11/+11
| | | | llvm-svn: 120696
* Rename all 'EvalXXX' methods in libChecker toTed Kremenek2010-12-011-2/+2
| | | | | | 'evalXXX'. llvm-svn: 120609
* Rename 'SValuator' to 'SValBuilder'. The new nameTed Kremenek2010-12-011-3/+3
| | | | | | reflects what the class actually does. llvm-svn: 120605
* Rename CXXObjectRegion to CXXTempObjectRegion.Zhongxing Xu2010-11-261-1/+2
| | | | llvm-svn: 120176
* Disallow the use of UnknownVal as the index for ElementRegions. UnknownVals ↵Ted Kremenek2010-09-151-6/+6
| | | | | | | | | | | | | | | | | can be used as the index when the value evaluation isn't powerful enough. By creating ElementRegions with UnknownVals as the index, this gives the false impression that they are the same element, when they really aren't. This becomes really problematic when deriving symbols from these regions (e.g., those representing the initial value of the index), since two different indices will get the same symbol for their binding. This fixes an issue with the idempotent operations checker that would cause two indices that are clearly not the same to make it appear as if they always had the same value. Fixes <rdar://problem/8431728>. llvm-svn: 113920
* Don't assert in the analyzer when analyze code does a byte load from a ↵Ted Kremenek2010-09-011-9/+2
| | | | | | function's address. Fixes PR 8052. llvm-svn: 112761
* - Allow making ElementRegions with complex offsets (expressions or symbols) ↵Jordy Rose2010-08-161-4/+13
| | | | | | | | | | for the purpose of bounds-checking. - Rewrite GRState::AssumeInBound to actually do that checking, and to use the normal constraint path. - Remove ConstraintManager::AssumeInBound. - Teach RegionStore and FlatStore to ignore those regions for now. llvm-svn: 111116
* MemRegion can refer to ASTContext without external help.Zhongxing Xu2010-08-111-3/+3
| | | | llvm-svn: 110784
* Makes GRState::makeWithStore private, to encourage clients to make store ↵Jordy Rose2010-08-031-0/+5
| | | | | | | | changes through GRState instead of directly accessing the StoreManager. Also adds cover methods for InvalidateRegion(s) and EnterStackFrame to GRState. This is in preparation for proposed region change notifications. No functionality change. llvm-svn: 110137
* Improve flat store: MemRegion::getAsOffset() computes a region's offset withinZhongxing Xu2010-08-021-1/+1
| | | | | | | | the top-level object. FlatStore now can bind and retrieve element and field regions. PR7297 is fixed by flat store. llvm-svn: 110020
* Fix PR 7475 by enhancing the static analyzer to also invalidate bindings for ↵Ted Kremenek2010-07-011-12/+2
| | | | | | | | | | | 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
* Analyzer: add support for CXXNewExpr.Zhongxing Xu2010-04-191-0/+7
| | | | llvm-svn: 101771
* Fix crash in StoreManager::CastRegion() when the base region is a type with ↵Ted Kremenek2010-04-071-7/+8
| | | | | | 0 size. llvm-svn: 100594
* Eliminate the ASTContext parameter from RecordDecl::getDefinition()Douglas Gregor2010-02-111-1/+1
| | | | | | | and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. llvm-svn: 95836
* Unify the implementation of getLValueElement of store managers.Zhongxing Xu2010-02-081-0/+55
| | | | | | | 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-0/+36
| | | | llvm-svn: 95535
* Move common methods to the base StoreManager class.Zhongxing Xu2010-02-081-13/+0
| | | | llvm-svn: 95534
* ASTContext is now a reference member of StoreManager.Zhongxing Xu2010-02-081-1/+1
| | | | llvm-svn: 95531
* More GRState* -> Store changes.Zhongxing Xu2010-02-051-8/+7
| | | | llvm-svn: 95360
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-0/+250
(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