summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/SVals.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rework use of loc::SymbolVal in the retain/release checker to use the new methodTed Kremenek2009-03-031-0/+36
| | | | | | | | | | | SVal::getAsLocSymbol(). This simplifies the code and allows the retain/release checker to (I believe) also correctly reason about location symbols wrapped in SymbolicRegions. Along the way I cleaned up SymbolRef a little, disallowing implicit casts to 'unsigned'. llvm-svn: 65972
* Fix case where we should use dyn_cast instead of cast.Ted Kremenek2009-03-031-1/+1
| | | | llvm-svn: 65956
* Fix a couple bugs:Ted Kremenek2009-01-301-4/+3
| | | | | | | | | | | | | | - NonLoc::MakeVal() would use sizeof(unsigned) (literally) instead of consulting ASTContext for the size (in bits) of 'int'. While it worked, it was a conflation of concepts and using ASTContext.IntTy is 100% correct. - RegionStore::getSizeInElements() no longer assumes that a VarRegion has the type "ConstantArray", and handles the case when uses use ordinary variables as if they were arrays. - Fixed ElementRegion::getRValueType() to just return the rvalue type of its "array region" in the case the array didn't have ArrayType. - All of this fixes <rdar://problem/6541136> llvm-svn: 63347
* Static analyzer: Remove a bunch of outdated SymbolData objects andTed Kremenek2009-01-221-31/+7
| | | | | | | | | | | | | | | | | | | | their associated APIs. We no longer need separate SymbolData objects for fields, variables, etc. Instead, we now associated symbols with the "rvalue" of a MemRegion (i.e., the value stored at that region). Now we only have two kinds of SymbolData objects: SymbolRegionRValue and SymbolConjured. This cleanup also makes the distinction between a SymbolicRegion and a symbolic value that is a location much clearer. A SymbolicRegion represents a chunk of symbolic memory, while a symbolic location is just a "pointer" with different possible values. Without any specific knowledge, a symbolic location resolves (i.e., via a dereference) to a SymbolicRegion. In the future, when we do better alias reasoning, a symbolic location can become an alias for another location, thus merging the constraints on the referred SymbolicRegion with the other region. llvm-svn: 62769
* Lazy bingding for region-store manager.Zhongxing Xu2008-12-201-0/+15
| | | | | | | | | | | | | * Now Bind() methods take and return GRState* because binding could also alter GDM. * No variables are initialized except those declared with initial values. * failed C test cases are due to bugs in RemoveDeadBindings(), which removes constraints that is still alive. This will be fixed in later patch. * default value of array and struct regions will be implemented in later patch. llvm-svn: 61274
* Add utility method. Remove an unused method.Zhongxing Xu2008-12-091-0/+2
| | | | llvm-svn: 60758
* Rename SymbolID to SymbolRef. This is a precursor to some overhauling of ↵Ted Kremenek2008-12-051-2/+2
| | | | | | the representation of symbolic values. llvm-svn: 60575
* Add utility methods.Zhongxing Xu2008-11-241-0/+9
| | | | llvm-svn: 59956
* Add getSize() support for StringRegion.Zhongxing Xu2008-11-241-0/+5
| | | | llvm-svn: 59930
* Initial support for checking out of bound memory access. Only support Zhongxing Xu2008-11-221-0/+5
| | | | | | ConcreteInt index for now. llvm-svn: 59869
* Add SymbolData for array elements and struct fields.Zhongxing Xu2008-11-191-0/+16
| | | | llvm-svn: 59618
* Flush llvm::errs() when printing out SVals.Ted Kremenek2008-11-151-1/+1
| | | | llvm-svn: 59334
* Pretty-printing for SVals now mainly uses llvm::raw_ostream. We have an ↵Ted Kremenek2008-10-301-125/+9
| | | | | | adapter for std::ostream, but this will be removed in the future. llvm-svn: 58445
* Added iterators to nonloc::CompoundSVal.Ted Kremenek2008-10-301-0/+21
| | | | | | Added pretty-printing for nonloc::CompoundSVal. llvm-svn: 58442
* 80 col violation.Ted Kremenek2008-10-301-3/+3
| | | | llvm-svn: 58441
* CompoundVal now uses an ImmutableList<SVal> to store its set of SVals. This ↵Ted Kremenek2008-10-301-3/+8
| | | | | | change was motivated by the need to allow state-splitting in GRExprEngine::VisitInitListExpr. As a side-benefit, we no longer need to perform any copies of SVals when creating a CompoundSVal, and the profiling of CompoundSVal is now constant time. llvm-svn: 58437
* Add CompoundVal and CompoundValData for representing the value of InitListExpr.Zhongxing Xu2008-10-301-0/+5
| | | | llvm-svn: 58418
* - Fix type-punning warning in SVals.cpp by using a real iterator class for ↵Ted Kremenek2008-10-271-11/+11
| | | | | | | | symbol_iterator. - Add symbol_iterator support for SymbolicRegions. llvm-svn: 58300
* Remove loc::StringLiteralVal. Now we allocate regions for string literals in ↵Zhongxing Xu2008-10-261-16/+0
| | | | | | the Store. llvm-svn: 58182
* Add printing with llvm::raw_ostream methods to SVals.Zhongxing Xu2008-10-241-0/+131
| | | | llvm-svn: 58073
* Rename:Zhongxing Xu2008-10-211-0/+399
RValues.h/cpp => SVals.h/cpp llvm-svn: 57893
OpenPOWER on IntegriCloud