summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Invalidate the alloca region by setting its default value to conjured symbol.Zhongxing Xu2009-06-291-2/+11
| | | | llvm-svn: 74419
* Adjust retrieve handler priority. If a field is of array type, it should be Zhongxing Xu2009-06-281-6/+6
| | | | | | handled by RetrieveArray(). llvm-svn: 74409
* Invalidate a field of struct type by setting its default value to conjured Zhongxing Xu2009-06-281-4/+15
| | | | | | symbol. llvm-svn: 74408
* Do not crash on binding concrete integer location.Zhongxing Xu2009-06-282-0/+6
| | | | llvm-svn: 74407
* Simplify some code. As in region store, we always expect the location is aZhongxing Xu2009-06-281-41/+34
| | | | | | memregion. llvm-svn: 74406
* Remove the last 'GetXXX' methods from GRStateManager.Ted Kremenek2009-06-271-0/+31
| | | | llvm-svn: 74361
* Remove '#include <sstream>' from libAnalysis.Ted Kremenek2009-06-262-2/+1
| | | | llvm-svn: 74245
* Update method signature.Ted Kremenek2009-06-261-2/+3
| | | | llvm-svn: 74244
* Unbreak build.Ted Kremenek2009-06-261-0/+346
| | | | llvm-svn: 74238
* Remove orphaned header file.Ted Kremenek2009-06-261-80/+0
| | | | llvm-svn: 74231
* Introduce a new concept to the static analyzer: SValuator.Ted Kremenek2009-06-268-518/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GRTransferFuncs had the conflated role of both constructing SVals (symbolic expressions) as well as handling checker-specific logic. Now SValuator has the role of constructing SVals from expressions and GRTransferFuncs just handles checker-specific logic. The motivation is by separating these two concepts we will be able to much more easily create richer constraint-generating logic without coupling it to the main checker transfer function logic. We now have one implementation of SValuator: SimpleSValuator. SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals (which is removed in this patch). This includes the logic for EvalBinOp, EvalCast, etc. Because SValuator has a narrower role than the old GRTransferFuncs, the interfaces are much simpler, and so is the implementation of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of SVal-related logic in GRSimpleVals and cleaned it up while moving it over to SimpleSValuator. As a consequence of removing GRSimpleVals, there is no longer a '-checker-simple' option. The '-checker-cfref' did everything that option did but also ran the retain/release checker. Of course a user may not always wish to run the retain/release checker, nor do we wish core analysis logic buried in the checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp to separate out these pieces into the core analysis engine. llvm-svn: 74229
* Remove declaration for unused and unimplemented static method.Ted Kremenek2009-06-251-6/+0
| | | | llvm-svn: 74182
* remove RegionKills GDM. Now UnknownVal is bound to regions explicitly.Zhongxing Xu2009-06-251-44/+5
| | | | llvm-svn: 74168
* Move element region retrieving logic into a separate function.Zhongxing Xu2009-06-251-31/+58
| | | | llvm-svn: 74166
* Move all logic for retrieving ElementRegion binding into a separate method.Zhongxing Xu2009-06-251-10/+54
| | | | | | Revert to setting default value approach for handling struct initialization. llvm-svn: 74160
* Remove uses of std::ostream from libAnalysis.Ted Kremenek2009-06-2410-72/+45
| | | | llvm-svn: 74136
* Remove GRStateManager::GetSValAsScalarOrLoc()/GetSVal().Ted Kremenek2009-06-242-2/+17
| | | | llvm-svn: 74128
* Update for LLVM API changes.Owen Anderson2009-06-241-1/+2
| | | | llvm-svn: 74085
* use a concrete type instead of a trait type to make code more readable.Zhongxing Xu2009-06-241-2/+1
| | | | llvm-svn: 74047
* RegionStore: revert to the default value approach for array initialization.Zhongxing Xu2009-06-241-8/+5
| | | | llvm-svn: 74043
* Remove GRStateManager::getRegion/getSelfRegion().Ted Kremenek2009-06-233-4/+4
| | | | llvm-svn: 74006
* Remove GRStateManager::BindLoc() and GRStateManager::Unbind().Ted Kremenek2009-06-233-16/+15
| | | | llvm-svn: 73996
* Remove GRStateManager::BindDecl() and GRStateManager::BindDeclWithInit().Ted Kremenek2009-06-231-2/+2
| | | | llvm-svn: 73995
* - Add MemRegion::getMemorySpace()Ted Kremenek2009-06-232-28/+23
| | | | | | | | | | - Change implementation of MemRegion::hasStackStorage()/hasHeapStorage() to use 'getMemorySpace()'. This avoids a double traversal up the region hierarchy and is simpler. - Add MemRegion::hasHeapOrStackStorage() as a slightly more efficient alternative to 'hasStackStorage() || hasHeapStorage()'. llvm-svn: 73977
* Move 'hasStackStorage()' and 'hasHeapStorage()' from MemRegionManager to ↵Ted Kremenek2009-06-234-11/+11
| | | | | | MemRegion. llvm-svn: 73973
* API cleanup: move more methods from GRStateManager to GRState.Ted Kremenek2009-06-232-2/+2
| | | | llvm-svn: 73968
* Update CMake file.Ted Kremenek2009-06-231-0/+1
| | | | llvm-svn: 73958
* Move all factory methods from SVal to ValueManager. API cleanup!Zhongxing Xu2009-06-238-156/+82
| | | | llvm-svn: 73954
* Split ValueManager method definitions into its own source file.Zhongxing Xu2009-06-232-119/+141
| | | | | | No functionality change. llvm-svn: 73952
* ValueManager::makeNonLoc -> ValueManager::makeIntValZhongxing Xu2009-06-233-6/+5
| | | | | | Clean up code with ValueManager. llvm-svn: 73951
* If the init list is fewer than the struct fields, bind the rest fields to 0Zhongxing Xu2009-06-231-11/+16
| | | | | | explicitly. Make 0 value with the field type. llvm-svn: 73949
* Instead of setting the default value of the array region, bind the rest of theZhongxing Xu2009-06-232-17/+23
| | | | | | array elements to 0 explicitly. Create 0 values with the element type. llvm-svn: 73946
* MemRegionManager: Migrate logic for getCodeTextRegion() over to using Zhongxing Xu2009-06-231-28/+4
| | | | | | trait-based MemRegion creation. llvm-svn: 73941
* Remove duplicated methods.Zhongxing Xu2009-06-232-17/+21
| | | | llvm-svn: 73940
* add a fixme.Zhongxing Xu2009-06-231-0/+2
| | | | llvm-svn: 73939
* MemRegions:Ted Kremenek2009-06-235-10/+22
| | | | | | | | - Embed a reference to MemRegionManager objects in MemSpaceRegion objects - Use this embedded reference for MemRegion objects to access ASTContext objects without external help - Use this access to ASTContext to simplify 'isBoundable' (no ASTContext& argument required) llvm-svn: 73935
* MemRegionManager: Migrate logic for getAllocaRegion() over to using ↵Ted Kremenek2009-06-231-16/+4
| | | | | | trait-based MemRegion creation. llvm-svn: 73927
* MemRegionManager: Migrate getObjCObjectRegion() and getTypedViewRegion() to useTed Kremenek2009-06-231-30/+3
| | | | | | the new trait-based construction of MemRegion objects. llvm-svn: 73926
* Migrate factory methods for FieldRegion and ObjCIVarRegion creation to use theTed Kremenek2009-06-221-28/+2
| | | | | | new generalized region-construction code. llvm-svn: 73921
* Refactor some of the logic in MemRegionManager for constructing regions usingTed Kremenek2009-06-221-70/+15
| | | | | | | | member template functions and traits. The idea is to allow MemRegionManager to construct subclasses of MemRegion that aren't declared in MemRegion.h (e.g., checker-specific regions). llvm-svn: 73917
* Allow CodeTextRegion to be cast to 'void *'.Zhongxing Xu2009-06-221-1/+3
| | | | llvm-svn: 73880
* Return UnknownVal for pointer arithmetic on struct fields.Zhongxing Xu2009-06-211-1/+6
| | | | llvm-svn: 73851
* Remove more GetSVal/GetLValue methods in GRExprEngine/GRState, insteadTed Kremenek2009-06-191-110/+106
| | | | | | | preferring to use their replacements in GRState. This further unifies the code paths for such logic and leads to some code reduction. llvm-svn: 73771
* A further step of r73690: associate the cast-to type with the created symbol,Zhongxing Xu2009-06-192-5/+8
| | | | | | | because the type of the symbol is used to create the default range. We need the sign to be consistent. llvm-svn: 73756
* If the SymbolicRegion was cast to another type, use that type to create the Zhongxing Xu2009-06-191-3/+9
| | | | | | ElementRegion. llvm-svn: 73754
* Move clients over from using GRStateManager::BindXXX and friends toTed Kremenek2009-06-1810-65/+48
| | | | | | GRState->bindXXX and friends (and constify some arguments along the way). llvm-svn: 73740
* Remove GRStateManager& field from SimpleConstraintManager.Ted Kremenek2009-06-184-26/+12
| | | | llvm-svn: 73735
* libAnalysis:Ted Kremenek2009-06-187-372/+286
| | | | | | | | | - Remove the 'isFeasible' flag from all uses of 'Assume'. - Remove the 'Assume' methods from GRStateManager. Now the only way to create a new GRState with an assumption is to use the new 'assume' methods in GRState. llvm-svn: 73731
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-186-11/+12
| | | | llvm-svn: 73702
* When casting region, if we do not create an element region, record the cast-to Zhongxing Xu2009-06-182-8/+21
| | | | | | | | | type. When retrieving the region value, if we are going to create a symbol value, use the cast-to type if possible. llvm-svn: 73690
OpenPOWER on IntegriCloud