summaryrefslogtreecommitdiffstats
path: root/clang/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed misspelling of "LLVM" due to some editor+Ted madness.Ted Kremenek2008-01-311-1/+1
| | | | llvm-svn: 46604
* Added transfer function support for unary '&' and '*', providing basicTed Kremenek2008-01-311-3/+16
| | | | | | | | | | (local) aliasing support. Modified ExplodedGraph pretty-printer (for GRConstants) to also print out the pointer value of the state associated with a node. This way one can easily see that two states are identical. llvm-svn: 46595
* Added 'SymbolicLValue' class to represent LValues whose value is symbolic.Ted Kremenek2008-01-311-15/+44
| | | | | | | Improved pretty-printing of LValues. Parameters whose values are pointers/references are now assigned SymbolicLValues. llvm-svn: 46584
* We now delay adding nodes created by GRBranchNodeBuilder to the analysisTed Kremenek2008-01-302-1/+16
| | | | | | | worklist until the dstor of GRBranchNodeBuilderImpl. This way clients can mark creates nodes as "sinks" before they are added to the worklist. llvm-svn: 46582
* Implemented some branch pruning in GRConstants using != and == forTed Kremenek2008-01-302-6/+130
| | | | | | constant integers. llvm-svn: 46581
* Minor cosmetic cleanups: replaced some integer literals with constants andTed Kremenek2008-01-301-5/+7
| | | | | | more cleanups with pretty-printing of analysis results. llvm-svn: 46564
* Implemented more boilerplate in GREngine for processing branches. NowTed Kremenek2008-01-292-2/+15
| | | | | | | we automatically generate a new successor node along an edge if the checker did not explicitly do so (i.e., we just propagate the current state). llvm-svn: 46536
* Fixed bit-setting bug for ExplodedNodeImpl::NodeGroup.Ted Kremenek2008-01-291-1/+1
| | | | llvm-svn: 46535
* Added boilerplate logic in GREngine for processing branches.Ted Kremenek2008-01-292-7/+57
| | | | llvm-svn: 46532
* Renamed GRNodeBuilder to GRStmtNodeBuilder.Ted Kremenek2008-01-292-8/+8
| | | | llvm-svn: 46531
* Minor fix in transfer function of '!=' where a 'false' literal shouldTed Kremenek2008-01-291-1/+1
| | | | | | have been 'true'. llvm-svn: 46530
* Added preliminary transfer function support for '==' and '!='.Ted Kremenek2008-01-291-59/+176
| | | | | | | Made some internal API cleanups with creating ConcreteInt values, which lead to some code reduction in implementing "++", "--". llvm-svn: 46528
* Added "SymbolManager", which manages the set of symbolic values usedTed Kremenek2008-01-291-4/+89
| | | | | | | | for analyzing a function. The initial state for GRConstants now assigns symbolic values to parameters. llvm-svn: 46517
* Fixed bug where not all dead subexpressions were being pruned from the analysisTed Kremenek2008-01-291-9/+14
| | | | | | state. llvm-svn: 46491
* Modified LiveVariables to perform all of its base initialization in the ctor,Ted Kremenek2008-01-293-14/+21
| | | | | | | | | and now we require a FunctionDecl* object so that we can also keep track of all of the ParmDecls. Modified clients of LiveVariables to conform to the new interface. llvm-svn: 46490
* Added skeleton code for tracking the values of function parameters.Ted Kremenek2008-01-291-0/+16
| | | | llvm-svn: 46477
* Driver now passes the top-level FunctionDecl* to GRConstants.Ted Kremenek2008-01-292-37/+34
| | | | | | | Refactoring: for GREngine and GRConstants, pushed references to CFG, ASTContext, and the top-level FunctionDecl into ExplodedGraphImpl. llvm-svn: 46475
* Added RValue class "UninitializedValue".Ted Kremenek2008-01-281-8/+27
| | | | llvm-svn: 46471
* Added transfer function logic for "%=" operator.Ted Kremenek2008-01-281-0/+8
| | | | llvm-svn: 46470
* Added transfer function hookups for "modulo" operator.Ted Kremenek2008-01-281-0/+7
| | | | llvm-svn: 46468
* Minor tweaking with hierarchy of NonLValue objects: SymbolValue isTed Kremenek2008-01-281-29/+24
| | | | | | | | now SymbolicNonLValue. Cleaned up some casts. llvm-svn: 46467
* Some additional cleanups with method names.Ted Kremenek2008-01-281-304/+298
| | | | | | | | | | | | | | | | | | | | | | Renamed ExprValue to RValue, as all expression values are RValues, and this keeps with the C terminology (renamed old "RValue" class to "NonLValue"). Introduced "ConcreteInt", a class that represents a concrete, integer constant as an RValue. Temporarily removed classes to represent set of possible constants and set of != constants. Will replace with a more general class representing a set of constraints. Added some foundational code to track "symbolic" values, which are used to accrue constraints on an abstract value that is shared between multiple variables. e.g: x = y; // at this point "x" and "y" share the same "value" if (x > 1) ... // at this point, the value shared by "x" and "y" is "> 1". llvm-svn: 46466
* Added back logic in patch r46361 ↵Ted Kremenek2008-01-261-3/+3
| | | | | | | | | | | | (http://llvm.org/viewvc/llvm-project?rev=46361&view=rev) with the addition of some previously missing NULL pointer checks. Modified the UninitializedValues analysis to not expect that every Expr* at the block-level is a block-level expression (we probably need to change the name of such expressions to something truer to their meaning). llvm-svn: 46380
* Implemented transfer function for '/='.Ted Kremenek2008-01-251-0/+8
| | | | llvm-svn: 46379
* Further refactoring of transfer functions by having APSIntSetOp takeTed Kremenek2008-01-251-15/+16
| | | | | | a template-template parameter. llvm-svn: 46378
* Renamed RValueDisjunctiveEqual to RValEqualityORSet. Ted Kremenek2008-01-251-107/+121
| | | | | | | | | Renamed RValueConjunctiveUnequal to RValInequalityANDSet. Refactored add/subtract/multiple (and now divide) operations for RValEqualityORSet to be based on a single template function. llvm-svn: 46374
* Fixed 80 col. violation.Ted Kremenek2008-01-251-1/+1
| | | | llvm-svn: 46370
* Renamed RValueMayEqualSet to RValueDisjunctiveEqual.Ted Kremenek2008-01-251-37/+36
| | | | llvm-svn: 46368
* Some minor restructuring around LValue and RValue types. The value "kind"Ted Kremenek2008-01-241-55/+77
| | | | | | | | | | information is not separated into a "base" and "sub" type. Eventually the value-tracking logic will know about LValues and RValues, but not about specialized LValues and RValues; separating the "kind" information into bits indicating whether an ExprValue is an LValue or an RValue from the bits that specify the actual value type makes this separation easier. llvm-svn: 46329
* enum value name change.Ted Kremenek2008-01-241-7/+6
| | | | llvm-svn: 46327
* More cleanups to pretty-printing of states in GraphViz output.Ted Kremenek2008-01-241-41/+47
| | | | llvm-svn: 46326
* Added transfer function for DeclStmt.Ted Kremenek2008-01-241-6/+39
| | | | llvm-svn: 46323
* Adjusted storage of values for Stmt* so that we need only query ifTed Kremenek2008-01-241-15/+23
| | | | | | | a Stmt* is a block-level expression when we INSERT a value into the map, and not also when we QUERY a value. llvm-svn: 46321
* Fixed a bug where the values of block-level expressions were being recorded inTed Kremenek2008-01-241-3/+4
| | | | | | the value map as if the expressions were non-block-level expressions. llvm-svn: 46319
* Minor tweaks in the transfer functions for pre- and post- ++/-- whereTed Kremenek2008-01-241-8/+12
| | | | | | | we falsely constructed an APInt to represent the constant '1' instead of using an APSInt (which has a sign). llvm-svn: 46317
* Added support for unary operator '-' for equality sets.Ted Kremenek2008-01-241-8/+81
| | | | | | | | Added some workarounds for loss of signess information on some APSInt operations. Considering the best route to integrate these into APSInt directly. (FIXME's in GRConstants.cpp). llvm-svn: 46310
* Added transfer functions for pre- and post- increment/decrement operators.Ted Kremenek2008-01-241-5/+82
| | | | llvm-svn: 46300
* Added passing "ASTContext" to both GREngine and GRConstants.Ted Kremenek2008-01-241-29/+129
| | | | | | Added initial support for integer casting operations to GRConstants. llvm-svn: 46298
* Minor tweak in GetValue to avoid an extra check for ParenExprs.Ted Kremenek2008-01-241-11/+16
| | | | llvm-svn: 46294
* Implemented value tracking support for '*' and '*='.Ted Kremenek2008-01-231-1/+38
| | | | | | Added "multiplication" support for equality sets. llvm-svn: 46289
* Implemented value tracking support for '+=' and '-='.Ted Kremenek2008-01-231-2/+17
| | | | llvm-svn: 46288
* Removed extra GraphViz node attributes for GRConstants, as some of them wereTed Kremenek2008-01-231-5/+0
| | | | | | causing problems with Dot. llvm-svn: 46285
* some prettying of the GraphViz visualization of GRConstants analysis results.Ted Kremenek2008-01-231-17/+50
| | | | llvm-svn: 46284
* Major "architectural" changes to the GRConstants analysis. We now reason aboutTed Kremenek2008-01-231-210/+541
| | | | | | | | | abstract "L-values" and "R-values" when doing value tracking, and expanding constant tracking to encompass tracking disjunctive sets of possible constants. Further, the tree-walking is more efficient, as we don't blindly recurse the tree if we won't generate new states. llvm-svn: 46278
* Fixed bug in 'GetBinding' when doing the lookup of stored values. We nowTed Kremenek2008-01-181-24/+47
| | | | | | | | | use ImmutableMap::SlimFind(), which returns the correct value. Added pruning of dead block-level expressions and Decls from our value map using liveness information. llvm-svn: 46154
* Fixed bug in 'LiveVariables' analysis where we incorrectly marked a variableTed Kremenek2008-01-181-2/+5
| | | | | | | dead at an assignment without taking into account if the variable was used in the RHS of the assignment. llvm-svn: 46153
* Modified the notion of "Block-level expressions" in CFGs to include Stmt*. ThisTed Kremenek2008-01-171-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | is because GNU-style Statement-expressions cause the last statement in the statement-expression to act like an expression. We now have two notions: block-level statements and block-level expressions. The former are all Stmt* that appear in the list of statements in CFGBlocks. The latter is the subset of the former; these block-level statements are used as subexpressions somewhere in the AST. CFG::isBlockExpr() returns true for the latter, not the former (previously isBlockExpr() always returned true for non-Expr Stmt*). Modified the LiveVariables analysis to also track liveness state for block-level expressions (using the updated definition of block-level expressions). Modified the dataflow solver so that when it records values for block-level statements, it records the dataflow value *before* the transfer function for a Stmt* is evaluated (not after). This is more in sync in what clients will want. Modified CFGStmtVisitor to record the current block-level statement. llvm-svn: 46143
* Added support to dataflow solver to (when requested) also record dataflowTed Kremenek2008-01-173-14/+11
| | | | | | | | | | | | | | values for the block-level expressions. Modified 'LiveVariables' to provide the option to clients to record liveness information for block-level expressions (using the above feature). Modified 'DeadStores' to conform to the new interface of 'LiveVariables'. Modified 'GRConstants' to compute liveness information for block-level expressions. llvm-svn: 46137
* Removed FindDeclRef, and used Expr::IgnoreParens instead (code refactoring).Ted Kremenek2008-01-171-18/+5
| | | | llvm-svn: 46133
* Added method Expr::IgnoreParens(), which returns the first non-ParenExpr Expr*.Ted Kremenek2008-01-171-9/+2
| | | | | | | Refactored the use of this method into both the Sema module and Analysis module, which were using their own static functions that did the same thing. llvm-svn: 46129
OpenPOWER on IntegriCloud