summaryrefslogtreecommitdiffstats
path: root/clang/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Regression fix: Handle pointer arithmetic in unary ++/--.Ted Kremenek2008-02-211-2/+2
| | | | llvm-svn: 47449
* Removed bogus assertions regard LValues binding to UnknownVal; they canTed Kremenek2008-02-211-4/+8
| | | | | | do so implicitly. llvm-svn: 47447
* Remove incorrect casts from UnknownVal to NonLVal.Ted Kremenek2008-02-211-2/+2
| | | | llvm-svn: 47446
* FIX: Promote the correct operand.Ted Kremenek2008-02-211-1/+1
| | | | llvm-svn: 47445
* Simplified and generalized transfer function logic for casts, allowingTed Kremenek2008-02-214-58/+23
| | | | | | | | | the transfer function to be invoked without an Expr* for the Cast operation. Added implicit promotions to the transfer function logic for compound assignments. llvm-svn: 47444
* Added transfer function support for sizeof(void)Ted Kremenek2008-02-211-5/+9
| | | | llvm-svn: 47443
* Major cleanup of path-sensitive analysis engine and the current analysisTed Kremenek2008-02-217-737/+737
| | | | | | | | | | | | | | | | based on constant. prop. and limited symbolics. - Renamed class: RValue -> RVal, LValue -> LVal, etc. - Minor method renamings and interface cleanups. - Tightened the RVal "type system" so that UninitializedVal and UnknownVal cannot be cast to LVal or NonLVal. This forces these corner cases values to be explicitly handled early before being dispatched to plug-in transfer function logic. - Major cleanup in the transfer function logic for binary and unary operators. Still fixing some regressions, but we now explicitly handle Uninitialized and Unknown values in a more rigorous way. llvm-svn: 47441
* Implemented transfer function logic for unary '+'Ted Kremenek2008-02-204-0/+30
| | | | llvm-svn: 47357
* Placed transfer function logic for dereferences in its own method, while atTed Kremenek2008-02-203-92/+144
| | | | | | the same time clearing up some logic of how the unary '*' operator is processed. llvm-svn: 47356
* Added missing case in constant propagation logic for handling the Xor ofTed Kremenek2008-02-191-0/+3
| | | | | | two concrete integer values. llvm-svn: 47341
* Added special handling for UninitializedVals for the transfer function logicTed Kremenek2008-02-191-0/+20
| | | | | | for pointer dereferences. llvm-svn: 47340
* Implemented "getType()" for symbolic values representing the "contents" ofTed Kremenek2008-02-191-1/+6
| | | | | | another symbolic value. llvm-svn: 47339
* Fixed transfer function for casts to always evaluate the effects of theTed Kremenek2008-02-191-5/+8
| | | | | | cast's subexpression even if the cast itself has no effect. llvm-svn: 47335
* Added transfer function support for casting to "void".Ted Kremenek2008-02-192-2/+10
| | | | llvm-svn: 47333
* Fixed bug classof() bug with RValues that could cause an UninitializedValTed Kremenek2008-02-191-1/+1
| | | | | | or UnknownVal to be interpreted as an actual NonLValue/LValue. llvm-svn: 47304
* Added back explicit state/node creation when visiting IntegerLiterals andTed Kremenek2008-02-192-2/+28
| | | | | | | | CharacterLiterals. This may not be a permanent solution; it doesn't cost that much, however, to create a few additional states, and solves a whole bunch of edge cases when handling ?, ||, and &&. llvm-svn: 47299
* Added boilerplate transfer function support for CallExprs.Ted Kremenek2008-02-193-15/+79
| | | | llvm-svn: 47298
* Added FIXME for properly handling local arrays using symbolic LValues.Ted Kremenek2008-02-191-0/+5
| | | | | | For now we just treat their values as "Unknown." llvm-svn: 47294
* --grsimple now reports the number of nodes in the ExplodedGraph forTed Kremenek2008-02-193-19/+43
| | | | | | | | | an analyzed function. GRExprEngine now records stores to "uninitialized lvalues" (which are sinks in the ExplodedGraph). llvm-svn: 47293
* Added more assertions and checks in transfer function logic to check forTed Kremenek2008-02-183-13/+58
| | | | | | UninitializedVals and UnknownVals. llvm-svn: 47288
* Temporary solution to push analysis through to analyzing PCRE.Ted Kremenek2008-02-181-2/+4
| | | | | | We will implement symbol "unification" later. llvm-svn: 47284
* A couple of msvc compile fixes from the ml; I haven't tested with msvc, Eli Friedman2008-02-161-2/+2
| | | | | | but the fixes are reasonable. llvm-svn: 47224
* Further cleanup. Moved definitions for SymbolManager and ValueManager intoTed Kremenek2008-02-163-163/+190
| | | | | | their own [.cpp;.h] files. llvm-svn: 47201
* Refactored code for transfer functions for binary operators involving two ↵Ted Kremenek2008-02-154-25/+35
| | | | | | | | | | | | LValues. Fixed bug in transfer functions for sizeof(*); we were incorrectly evaluating to a value of the wrong type. Fixed bug in transfer functions for compound assignments where we did not properly handle assignments involving dereferences of symbolic values. llvm-svn: 47190
* Added transfer function support for conditional branches with a NULL ↵Ted Kremenek2008-02-151-5/+30
| | | | | | | | condition (e.g., "for(;;)"). Fixed bug in transfer function for compound assignment operators when both operands where variables but had a non-pointer type (we fired an assertion). llvm-svn: 47184
* Simplified transfer function logic for ++/-- operators.Ted Kremenek2008-02-154-76/+64
| | | | | | | | | Added more boilerplate transfer function support for pointer arithmetic. Added more pretty-printing support for symbolic constraints. Added transfer function support for handling enum values. Minor pointer types cleanup in ExplodedGraphImpl. llvm-svn: 47183
* Remove unnecessary references to VariableArrayType from Analysis.Eli Friedman2008-02-151-2/+2
| | | | llvm-svn: 47157
* Added boilerplate transfer function support for pointer arithmetic operations.Ted Kremenek2008-02-153-2/+24
| | | | llvm-svn: 47147
* Added --grsimple-view option to clang driver; this is the same asTed Kremenek2008-02-151-2/+2
| | | | | | | | --grsimple except that it visualizes the ExplodedGraph using dot and outputs the current function being analyzed. --grsimple is now silent except when it emits diagnostics. llvm-svn: 47146
* Added "symbol iterators" for RValues, allowing easy iteration over the symbolsTed Kremenek2008-02-143-6/+60
| | | | | | | | referenced by an RValue, instead of having to query the type of the RValue. Modified ValueState::RemoveDeadBindings to also prune dead symbols. llvm-svn: 47142
* When visualizing ExplodedNodes created by GRExprEngine, color nodes withTed Kremenek2008-02-141-1/+10
| | | | | | null-dereferences or bad control-flow red. llvm-svn: 47140
* Don't analyze functions when we have parse errors.Ted Kremenek2008-02-141-0/+3
| | | | llvm-svn: 47139
* Renamed GRConstants => GRSimpleVals.Ted Kremenek2008-02-143-32/+39
| | | | | | Moved driver logic for --grsimple to GRSimpleVals.cpp. llvm-svn: 47137
* #include cleanups in GRExprEngine.cpp/GRExprEngine.h. Moved GRExprEngine toTed Kremenek2008-02-141-0/+6
| | | | | | clang namespace. llvm-svn: 47136
* Partitioned definition/implementation of GRExperEngine into .h and .cpp.Ted Kremenek2008-02-141-337/+7
| | | | | | Still some cleanup to do, but this initial checkin compiles and runs correctly. llvm-svn: 47135
* Migrated transfer functions for binary operators for simple value trackingTed Kremenek2008-02-145-84/+215
| | | | | | from RValues to GRTransferFuncs/GRSimpleVals. llvm-svn: 47131
* Migrated transfer functions for unary "~" and "-" to ↵Ted Kremenek2008-02-144-20/+42
| | | | | | GRTransferFuncs/GRSimpleVals. llvm-svn: 47126
* Started partitioning of transfer function logic (and thus the policy behind Ted Kremenek2008-02-145-50/+155
| | | | | | | | | | these operations) into GRTransferFuncs and its subclasses. Originally all of this logic was handled by the class RValue, but in reality different analyses will want more flexibility on how they evaluate different values. Transfer functions migrated so far: "Cast" llvm-svn: 47125
* Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".Ted Kremenek2008-02-144-549/+2
| | | | llvm-svn: 47123
* Added support to GRCoreEngine/GRExprEngine for processing control-flowTed Kremenek2008-02-132-5/+182
| | | | | | from switch...case...default statements. llvm-svn: 47100
* Fixed 80 col violations.Ted Kremenek2008-02-131-6/+6
| | | | llvm-svn: 47076
* Unbreak the build.Ted Kremenek2008-02-131-1/+1
| | | | llvm-svn: 47072
* Renamed files to match class renaming in r47070:Ted Kremenek2008-02-132-0/+0
| | | | | | http://llvm.org/viewvc/llvm-project?rev=47070&view=rev llvm-svn: 47071
* Renamed class GREngine => GRCoreEngine.Ted Kremenek2008-02-135-79/+79
| | | | | | | | | Renamed class GRConstants => GRExprEngine. This was done with a Perl script, and will result in 80 col. violations that I will gradually fix up. llvm-svn: 47070
* Simplify GRIndirectGotoNodeBuilder.Ted Kremenek2008-02-132-25/+6
| | | | llvm-svn: 47068
* Added GREngine support for "break" and "continue".Ted Kremenek2008-02-131-2/+4
| | | | llvm-svn: 47064
* Added support to GREngine/GRConstants for handling computed gotos.Ted Kremenek2008-02-132-1/+107
| | | | llvm-svn: 47038
* Added GREngine support for GotoStmt.Ted Kremenek2008-02-121-19/+24
| | | | llvm-svn: 47034
* Added transfer function/value track logic for taking the address of a label.Ted Kremenek2008-02-123-5/+49
| | | | llvm-svn: 47030
* Minor (cosmetic) reshuffling of code. Fixed a bug in "Assume" logic whenTed Kremenek2008-02-121-11/+16
| | | | | | | handling Non-Lvalues of the type nonlval::SymbolVal; we were accidentally casting them to lval::SymbolVal. llvm-svn: 47029
OpenPOWER on IntegriCloud