- Jul 06, 2010
-
-
Tom Care authored
Added a path-sensitive idempotent operation checker (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect. Example: { int a = 1; int b = 5; int c = b / a; // a is 1 on all paths } - New IdempotentOperationChecker class - Moved recursive Stmt functions in r107675 to IdempotentOperationChecker - Minor refactoring of SVal to allow checking for any integer - Added command line option for check - Added basic test cases llvm-svn: 107706
-
- Apr 19, 2010
-
-
Dan Gohman authored
llvm-svn: 101786
-
- Mar 10, 2010
-
-
Zhongxing Xu authored
llvm-svn: 98136
-
- Feb 05, 2010
-
-
Zhongxing Xu authored
spread GRState* everywhere. llvm-svn: 95354
-
- Jan 25, 2010
-
-
Ted Kremenek authored
(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
-
- Jan 11, 2010
-
-
Zhongxing Xu authored
This with previous patch fixes a OSAtomic test case. llvm-svn: 93146
-
- Nov 25, 2009
-
-
Ted Kremenek authored
Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a precursor to having basic static analysis support for blocks. llvm-svn: 89828
-
- Nov 10, 2009
-
-
Zhongxing Xu authored
getBaseRegion will be used in another method. llvm-svn: 86649
-
- Nov 09, 2009
-
-
Zhongxing Xu authored
llvm-svn: 86523
-
- Sep 09, 2009
-
-
Mike Stump authored
llvm-svn: 81346
-
- Aug 28, 2009
-
-
Ted Kremenek authored
pointers. Most logic cares first about whether or not a region is symbolic, and second if represents code. This should fix a series of silent corner case bugs (as well as simplify a bunch of code). llvm-svn: 80335
-
- Aug 23, 2009
-
-
Benjamin Kramer authored
llvm-svn: 79854
-
- Aug 06, 2009
-
-
Ted Kremenek authored
RegionStore already lazily abstracted the contents of arrays and structs, when doing an assignment from one array/struct to another we did an explicit element-wise copy, which resulted in a loss of laziness and huge performance problem when analyzing many code bases. Now RegionStoreManager handles such assignments using a new SVal could 'LazyCompoundSVal', which basically means the value of a given struct or array (a MemRegion*) in a specific state (GRState). When we do a load from a field whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field lookup in the original structure. This means we have essentially zero copying of data for structs/arrays and everything stays lazy. llvm-svn: 78268
-
- Jul 29, 2009
-
-
Ted Kremenek authored
OldCastRegion used), and the associated command line option '-analyzer-store=old-basic-cast'. llvm-svn: 77509
-
Ted Kremenek authored
index 0. This will be used for refinements to InvalidateRegion and CastRegion. llvm-svn: 77481
-
- Jul 14, 2009
-
-
Ted Kremenek authored
llvm-svn: 75672
-
Ted Kremenek authored
Tidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', and implementing operator<< support for llvm::raw_ostream. llvm-svn: 75560
-
- Jun 30, 2009
-
-
Zhongxing Xu authored
llvm-svn: 74521
-
- Jun 26, 2009
-
-
Ted Kremenek authored
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
-
- Jun 25, 2009
-
-
Ted Kremenek authored
llvm-svn: 74136
-
- Jun 23, 2009
-
-
Zhongxing Xu authored
llvm-svn: 73954
-
Zhongxing Xu authored
No functionality change. llvm-svn: 73952
-
Zhongxing Xu authored
Clean up code with ValueManager. llvm-svn: 73951
-
Zhongxing Xu authored
array elements to 0 explicitly. Create 0 values with the element type. llvm-svn: 73946
-
- Jun 19, 2009
-
-
Zhongxing Xu authored
because the type of the symbol is used to create the default range. We need the sign to be consistent. llvm-svn: 73756
-
Ted Kremenek authored
GRState->bindXXX and friends (and constify some arguments along the way). llvm-svn: 73740
-
- Jun 18, 2009
-
-
Zhongxing Xu authored
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
-
- May 12, 2009
-
-
Zhongxing Xu authored
array region, set its default value to conjured symbol. When retrieving its element, create new region value symbol for the element. Also fix some 80 columns violations. llvm-svn: 71548
-
- May 09, 2009
-
-
Zhongxing Xu authored
SymbolRegionRValue => SymbolRegionValue SymExpr::RegionRValue => SymExpr::RegionValueKind llvm-svn: 71322
-
Zhongxing Xu authored
TypedRegion::getValueType(). llvm-svn: 71321
-
Zhongxing Xu authored
RValueType => ObjectType LValueType => LocationType No functionality change. llvm-svn: 71304
-
- May 04, 2009
-
-
Ted Kremenek authored
llvm-svn: 70865
-
Zhongxing Xu authored
no-outofbounds.c still fails. Previously it passed because the array index is mistakenly a loc::ConcreteInt. llvm-svn: 70844
-
- Apr 21, 2009
-
-
Ted Kremenek authored
layered regions. llvm-svn: 69686
-
- Apr 20, 2009
-
-
Zhongxing Xu authored
llvm-svn: 69577
-
Zhongxing Xu authored
get FunctionDecl with more general utility method. llvm-svn: 69570
-
Zhongxing Xu authored
methods of SVal. llvm-svn: 69565
-
- Apr 11, 2009
-
-
Ted Kremenek authored
ProgramPoints all the way through to GRCoreEngine. NSString.m now fails with RegionStoreManager because of the void** cast. Disabling use of region store for that test for now. llvm-svn: 68845
-
- Apr 10, 2009
-
-
Ted Kremenek authored
llvm-svn: 68800
-
Zhongxing Xu authored
A CodeTextRegion wraps two kinds of data: FunctionDecl* or SymbolRef. The latter comes from the symbolic function pointer that are generated from function calls or input data. llvm-svn: 68777
-