summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/Environment.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add comments.Zhongxing Xu2009-03-121-0/+8
| | | | llvm-svn: 66782
* Implement FIXME: GRStateManager::scanReachableSymbols now supports scanning ↵Ted Kremenek2009-03-031-1/+2
| | | | | | MemRegions. llvm-svn: 65919
* Added GRStateManager::scanReachableSymbols(), a method which scans the reachableTed Kremenek2009-02-141-7/+15
| | | | | | | | | | | | | symbols from an SVal. - Fixed a bug in EnvironmentManager::RemoveDeadBindings() where it did not mark live all the symbols reachable from a live block-level expression. - Fixed a bug in the retain/release checker where it did not stop tracking symbols that 'escaped' via compound literals being assigned to something the BasicStoreManager didn't reason about. llvm-svn: 64534
* Static Analyzer: Replace LiveSymbols/DeadSymbols sets with a new object ↵Ted Kremenek2009-01-211-8/+6
| | | | | | called "SymbolReaper". Right now it just consolidates the two and cleans up some client code, but shortly it will be used to enable "lazy computation" of live symbols for use with RegionStore. llvm-svn: 62722
* remove unused varNuno Lopes2008-11-251-1/+0
| | | | llvm-svn: 60018
* GRStateRef:Ted Kremenek2008-11-121-19/+23
| | | | | | | | | | | | - Rename SetSVal to BindLoc - Add BindDecl - Add BindExpr GRState: - Environment now binds to Stmt* instead of Expr*. This is needed for processing ObjCForCollectionStmt (essentially the declaration of the the 'element' variable can have an SVal attached to it). - BindDecl no longer accepts Expr* for the initialization value; use SVal* instead. llvm-svn: 59152
* Rename:Zhongxing Xu2008-10-301-2/+2
| | | | | | | - SetSVal(GRState*, Loc, SVal) => BindLoc - SetSVal(GRState*, Expr*, SVal) => BindExpr llvm-svn: 58421
* Rename ExplicitCCastExpr to CStyleCastExprDouglas Gregor2008-10-281-1/+1
| | | | llvm-svn: 58331
* Refactor the expression class hierarchy for casts. Most importantly:Douglas Gregor2008-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | - CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. llvm-svn: 58264
* Add code for get the lvalue for string literals. Now we return a StringRegionZhongxing Xu2008-10-251-7/+4
| | | | | | | for StringLiteral lvalue evaluation, instead of directly returning a loc::StringLiteralVal by the Environment. llvm-svn: 58138
* This patch did the following renaming. There should be no functional changes.Zhongxing Xu2008-10-171-15/+15
| | | | | | | | | | RVal => SVal LVal => Loc NonLVal => NonLoc lval => loc nonlval => nonloc llvm-svn: 57671
* This is a big patch, but the functionality change is small and the rest of ↵Ted Kremenek2008-10-041-11/+9
| | | | | | | | | | | | | | 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
* Modify comments.Zhongxing Xu2008-08-211-2/+3
| | | | llvm-svn: 55150
* Patch by Zhongxing Xu:Ted Kremenek2008-08-201-0/+48
| | | | | | This patch moves some code in GRStateManager::RemoveDeadBindings() to EnvironmentManager::RemoveDeadBindings(). llvm-svn: 55064
* Add ExplicitCastExpr to replace the current CastExpr, and have ↵Argyrios Kyrtzidis2008-08-181-13/+2
| | | | | | | | | | | ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr): Expr -> CastExpr -> ExplicitCastExpr -> ImplicitCastExpr llvm-svn: 54955
* Move some environment methods from ValueState/ValueStateManager to ↵Ted Kremenek2008-07-101-8/+95
| | | | | | Environment/EnvironmentManager. llvm-svn: 53412
* Initial work on splitting the ValueState into an Environment, Store, andTed Kremenek2008-07-081-0/+29
Constraints. These concepts are already present in the current ValueState, but the implementation is monolothic. Making ValueState more modular opens up new design choices for customizing the analysis engine. In the context of the analysis engine, the "Environment" is the binding between Expr* (expressions) and intermediate symbolic values (RValues). llvm-svn: 53252
OpenPOWER on IntegriCloud