summaryrefslogtreecommitdiffstats
path: root/clang/Analysis/GRExprEngine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-1941/+0
| | | | | | | | | | lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
* Handle StmtExprs whose last contained statement is not an expression.Ted Kremenek2008-03-151-3/+11
| | | | llvm-svn: 48388
* Compute alignment in bytes, not bits.Ted Kremenek2008-03-151-1/+1
| | | | llvm-svn: 48387
* Implement transfer function logic for alignof operator (types).Ted Kremenek2008-03-151-16/+16
| | | | llvm-svn: 48386
* Added transfer function support in GRExprEngine for __extension__.Ted Kremenek2008-03-151-0/+4
| | | | llvm-svn: 48385
* "panic" has 5 letters, not 4. Bug pointed out by Nuno Lopes!Ted Kremenek2008-03-141-3/+7
| | | | llvm-svn: 48377
* Hack to hardwire in some panic functions that are not marked noreturn.Ted Kremenek2008-03-141-2/+22
| | | | llvm-svn: 48374
* Emit warnings for undefined control-flow.Ted Kremenek2008-03-141-0/+1
| | | | llvm-svn: 48368
* Changed CallRetValSymbol to SymbolConjured to allow "conjured" symbols to be ↵Ted Kremenek2008-03-121-2/+21
| | | | | | | | | created for any expression, not just CallExprs. Added experimental support for conjuring symbols during assingments where the RHS is "unknown". This allows more value tracking for path-sensitivity. Fixed bug in "assumption" logic when processing symbolic constraints; we would improperly mark constraints we didn't support as infeasible. llvm-svn: 48306
* Improved ExplodedGraph::Trim to only show nodes reachable from a reverse BFSTed Kremenek2008-03-121-8/+34
| | | | | | | from the sources, and to try and generate only a single path from sources to roots. llvm-svn: 48286
* Expanded graph-visualization to include optional pretty-printing of ↵Ted Kremenek2008-03-111-1/+6
| | | | | | checker-specific state. llvm-svn: 48238
* Expanded graph visualization interface to include specifying a range ofTed Kremenek2008-03-111-14/+25
| | | | | | nodes to use a trim sources. llvm-svn: 48236
* More edge-case handling with using liveness information to prune dead state ↵Ted Kremenek2008-03-101-0/+2
| | | | | | values. llvm-svn: 48127
* More cleanups with using the liveness analysis to removed dead symbols andTed Kremenek2008-03-101-40/+25
| | | | | | | | | | variables from the symbolic state. Now we keep a mapping from the predecessor node of a statement and its cleaned state, and interpose an accessor "GetState()" to return the cleaned state when the node is the predecessor node, and the real state otherwise. This obviates problem of ever accidentally cleaning the state more than once (thus blowing away new bindings by mistake). llvm-svn: 48124
* When processing the transfer function for a statement, evaluateTed Kremenek2008-03-091-15/+10
| | | | | | | | RemoveDeadBindings early because (1) it will always be called and (2) we can dispatch to a plug-in transfer function that can evaluate the effect of dead symbols (not yet added). llvm-svn: 48114
* Refactored guards for "GRExprEngine::RemoveDeadBindings" directly into theTed Kremenek2008-03-091-17/+15
| | | | | | | method. This paves the way for other alterations to RemoveDeadBindings that are transparent to its callers. llvm-svn: 48113
* Bug fix in the transfer function for compound assignments: if the valueTed Kremenek2008-03-091-13/+9
| | | | | | | of the LHS expressions is Unknown, the value of the entire expression does not evaluate to the RHS (as is the case with normal assignments). llvm-svn: 48102
* Fixed crash where SetBlkExpr would attempt to query the liveness data whenTed Kremenek2008-03-091-1/+1
| | | | | | we weren't processing a statement within a basic block. llvm-svn: 48087
* Bug fix: Don't call RemoveDeadBindings more than once (can kill newly ↵Ted Kremenek2008-03-091-8/+27
| | | | | | generated values to Block-Level Expressions). llvm-svn: 48079
* Added --trim-path-graph to the driver to trim paths from the ExplodedGraphTed Kremenek2008-03-071-17/+44
| | | | | | | | | | | | | | | | that are not related to error nodes. Fixed bug where we did not detect some NULL dereferences. Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach a set of provided nodes. Fixed subtle bug in ExplodedNodeImpl where we could create predecessor iterators that included the mangled "sink" bit. The better fix is to integrate this bit into the void* for the wrapped State, not the NodeGroups representing a node's predecessors and successors. llvm-svn: 48036
* Improved graph visualization of ExplodedGraphs to include source line and columnTed Kremenek2008-03-071-4/+21
| | | | | | information. llvm-svn: 48031
* Renamed ValueManager to BasicValueFactory.Ted Kremenek2008-03-071-11/+11
| | | | llvm-svn: 48025
* Refined divide-by-zero checking to distinguish between must and mayTed Kremenek2008-03-071-25/+41
| | | | | | divide-by-zero errors. llvm-svn: 48013
* Added transfer function support for __builtin_expect.Ted Kremenek2008-03-051-2/+15
| | | | llvm-svn: 47971
* Small bug fix when handling CallExprs that generate sink nodes.Ted Kremenek2008-03-051-11/+2
| | | | llvm-svn: 47970
* Fixed bug that could case unwanted bifurcation of states when evaluating calls.Ted Kremenek2008-03-051-19/+36
| | | | llvm-svn: 47964
* Minor cleanups (mainly indentation).Ted Kremenek2008-03-051-14/+0
| | | | llvm-svn: 47955
* remove the source location arguments to various target query methods.Chris Lattner2008-03-051-9/+5
| | | | llvm-svn: 47954
* Plug-in transfer function "EvalCall" now takes as an argument the currentTed Kremenek2008-03-051-1/+7
| | | | | | GRStmtNodeBuilder and is now responsible for adding its own nodes to the graph. llvm-svn: 47923
* Moved implementation of GRExprEngine::Nodify into GRStmtNodeBuilder. This willTed Kremenek2008-03-041-24/+0
| | | | | | | allow us to pass the builder to plug-in transfer functions and allow those functions to create intermediate nodes. llvm-svn: 47919
* Added preliminary transfer function support for references.Ted Kremenek2008-03-041-3/+8
| | | | llvm-svn: 47912
* For the transfer function for CallExpr, invalidate all argumentsTed Kremenek2008-03-041-19/+44
| | | | | | passed-by-reference to builtin functions until we have better builtin support. llvm-svn: 47910
* For the transfer function of DeclStmt, for now initialize the values ofTed Kremenek2008-03-041-8/+13
| | | | | | structs (local variables) to Unknown instead of Undefined. (added FIXME to initialize *members* of struct to undefined) llvm-svn: 47901
* Add transfer function support for the default initialization of staticTed Kremenek2008-03-041-2/+28
| | | | | | variables that are pointers or integers. llvm-svn: 47880
* Fixed insidious state propagation bug that would sometimes cause the stateTed Kremenek2008-03-041-6/+5
| | | | | | to bifurcate at the wrong places and not propagate at others. llvm-svn: 47876
* Enhanced pretty-printing of undefined-argument errors.Ted Kremenek2008-03-041-1/+1
| | | | llvm-svn: 47873
* Added FIXME.Ted Kremenek2008-03-031-6/+14
| | | | llvm-svn: 47842
* Added extra check for calls to functions where we pass undefined valuesTed Kremenek2008-02-291-4/+24
| | | | | | as arguments. llvm-svn: 47778
* Add checks for function calls via a function pointer that is NULL, Undefined,Ted Kremenek2008-02-291-16/+12
| | | | | | or otherwise a constant integer value that doesn't evaluate to an address. llvm-svn: 47774
* "Refinement" of hack to bound loop-traversals: visit any block at a maximum ↵Ted Kremenek2008-02-291-42/+18
| | | | | | of 3 times along a given path. llvm-svn: 47766
* Added checking for undefined results of '<<' and '>>' (shifting by too many ↵Ted Kremenek2008-02-281-6/+38
| | | | | | | | bits, etc.) This current implementation only works when both operands are concrete values; later we will add support for symbolic values. llvm-svn: 47726
* Merged ValueState and ValueStateImpl into just ValueState, with ↵Ted Kremenek2008-02-281-66/+65
| | | | | | GRExprEngine::StateTy just becoming ValueState*. llvm-svn: 47714
* Renamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.Ted Kremenek2008-02-281-63/+63
| | | | llvm-svn: 47713
* End paths when calling a function marked "noreturn."Ted Kremenek2008-02-271-0/+15
| | | | llvm-svn: 47690
* Small tweaks to the transfer function for DeclStmt: do not mark external globalTed Kremenek2008-02-271-5/+17
| | | | | | variables as uninitialized, and only "initialize" static function variables. llvm-svn: 47683
* Small fix to VisitLVal: this method can be called on Block-Level expressions. Ted Kremenek2008-02-271-2/+5
| | | | | | In such cases, handle them just like Visit(). llvm-svn: 47665
* When analyzing a function, eagerly create symbolic values for allTed Kremenek2008-02-271-30/+25
| | | | | | globals/parameters at the beginning of the analysis. llvm-svn: 47664
* Header file cleanups: reduce number of includes; move ValueState.h into ↵Ted Kremenek2008-02-271-2/+5
| | | | | | include directory tree. llvm-svn: 47661
* Similar bug fix to r47650; when processing CallExprs if we did not generate anTed Kremenek2008-02-271-0/+1
| | | | | | | ExplodedNode for the Callee subexpression we would not evaluate the CallExpr transfer function. llvm-svn: 47651
* Fixed bug in the core transfer function logic for CallExprs where we wouldTed Kremenek2008-02-271-0/+3
| | | | | | | sometimes skip evaluating all the arguments when some arguments would not create new ExplodedNodes. llvm-svn: 47650
OpenPOWER on IntegriCloud