summaryrefslogtreecommitdiffstats
path: root/clang/Analysis
Commit message (Collapse)AuthorAgeFilesLines
...
* Added preliminary transfer function support for references.Ted Kremenek2008-03-042-4/+9
| | | | 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
* Implemented "print" method for ValueState.Ted Kremenek2008-03-041-10/+16
| | | | llvm-svn: 47894
* 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-042-9/+37
| | | | llvm-svn: 47873
* Fixed subtle caching bug in ExplodedGraph that would cause some nodes toTed Kremenek2008-03-031-16/+0
| | | | | | be incorrectly merged together. llvm-svn: 47851
* 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-292-4/+29
| | | | | | as arguments. llvm-svn: 47778
* Add checks for function calls via a function pointer that is NULL, Undefined,Ted Kremenek2008-02-292-16/+17
| | | | | | 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-292-46/+22
| | | | | | of 3 times along a given path. llvm-svn: 47766
* Added simple hack to reduce redundant warnings from the checker:Ted Kremenek2008-02-281-0/+14
| | | | | | | | | Cache the location of the error. Don't emit the same warning for the same error type that occurs at the same program location but along a different path. llvm-svn: 47727
* Added checking for undefined results of '<<' and '>>' (shifting by too many ↵Ted Kremenek2008-02-284-29/+106
| | | | | | | | 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-284-119/+114
| | | | | | GRExprEngine::StateTy just becoming ValueState*. llvm-svn: 47714
* Renamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.Ted Kremenek2008-02-284-75/+75
| | | | llvm-svn: 47713
* Fixed use of an uninitialized variable.Ted Kremenek2008-02-271-1/+1
| | | | llvm-svn: 47691
* 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
* Added string "[CHECKER]" to the output diagnostics produced by the ↵Ted Kremenek2008-02-271-0/+5
| | | | | | GRSimpleVals analysis. llvm-svn: 47678
* 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-272-31/+30
| | | | | | 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-274-281/+7
| | | | | | 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
* Fix bug when processing '?' operator: invalidate the old "Uninitialized" ↵Ted Kremenek2008-02-263-7/+26
| | | | | | value of the block-level expression for ?. llvm-svn: 47645
* Added boilerplate for plug-in transfer function support for CallExprs.Ted Kremenek2008-02-262-0/+32
| | | | | | GRSimpleVals performs the following action: invalidate all values passed-by-reference. llvm-svn: 47638
* Don't emit divide-by-zero errors when we divide by an unknown (notTed Kremenek2008-02-261-45/+57
| | | | | | uninitialized) value. At this point we're just too imprecise. llvm-svn: 47636
* Removed static analysis-specific diagnostics from DiagnosticKinds.def.Ted Kremenek2008-02-262-12/+48
| | | | | | | Use custom diagnostics for static analysis checkers. Added warnings for dereferencing uninitialized values and divide-by-zeroes. llvm-svn: 47626
* Removed hack with toggling the signedness flag of the APSInt storedTed Kremenek2008-02-261-9/+2
| | | | | | | | | in an EnumConstantDecl. This was made possible because of a recent fix in the parser: http://llvm.org/viewvc/llvm-project?rev=47581&view=rev llvm-svn: 47624
* Small fixes to shore up overhauling of transfer function logic for '&&' and '||.Ted Kremenek2008-02-262-4/+15
| | | | llvm-svn: 47620
* optimization: no longer create ExplodedNodes for IntegerLiteral andTed Kremenek2008-02-262-30/+29
| | | | | | CharacterLiteral expressions. llvm-svn: 47617
* Major cleanup of the transfer function logic for '&&', '||', and '?'. WeTed Kremenek2008-02-263-78/+134
| | | | | | | | now store in the state essentially which branch we took. This removes a bunch of bogus assumptions (and likely bugs), reduces the complexity of the implementation, and facilitates more optimizations. llvm-svn: 47613
* Fixed inverted condition.Ted Kremenek2008-02-261-1/+1
| | | | llvm-svn: 47590
* Added lazy "symbolication" of parameter variables and global variables.Ted Kremenek2008-02-264-15/+86
| | | | | | Added recording of divide-by-zero and divide-by-uninitialized nodes. llvm-svn: 47586
* Added FIXME.Ted Kremenek2008-02-261-0/+2
| | | | llvm-svn: 47578
* Minor bug fix in LiveVariables: don't "kill" decls referenced by a DeclStmtTed Kremenek2008-02-251-5/+5
| | | | | | that aren't VarDecls. llvm-svn: 47572
* Better handling of calls to functions via function pointers.Ted Kremenek2008-02-251-3/+5
| | | | llvm-svn: 47562
* Fixed bug in RemoveDeadBindings when performing the mark-and-sweep over theTed Kremenek2008-02-251-4/+2
| | | | | | | symbolic store: VarDecl's inserted into the sweep may not always bind to anything; handle this special case just like bindings to uninitialized values. llvm-svn: 47550
* Expanded transfer function support for divide-by-zero checking to includeTed Kremenek2008-02-251-3/+10
| | | | | | "remainder-by-zero" checking (operator '%'). llvm-svn: 47549
* Added hack to transfer function logic to handle the case where a DeclRefExprTed Kremenek2008-02-251-1/+9
| | | | | | | | wrapping an EnumConstantDecl evaluates to an integer type that has a different signedness than the APSInt stored in the EnumConstantDecl. Will file a Bugzilla report. llvm-svn: 47548
* Added transfer function support for checking for divide-by-zero errors.Ted Kremenek2008-02-251-1/+55
| | | | llvm-svn: 47547
* Fixed horrid bug in LiveVariables analysis where we were only merging atTed Kremenek2008-02-221-1/+1
| | | | | | | confluence points the liveness information for variables (Decls) and NOT block-level expressions. llvm-svn: 47506
* Punt on unifying symbolic lvalues. This won't be needed for many checkers.Ted Kremenek2008-02-221-6/+12
| | | | llvm-svn: 47489
* Added "assumption" logic for lval::FuncVal and lval::GotoLabel, and simplifiedTed Kremenek2008-02-222-13/+8
| | | | | | assumption logic for lval::DeclVal. llvm-svn: 47466
* Bug fix: For transfer function for unary "!", compare the subexpression valueTed Kremenek2008-02-221-1/+2
| | | | | | against '0' of the same bit-width. llvm-svn: 47465
* Bug fix in liveness: Only compute liveness information for VarDecls.Ted Kremenek2008-02-221-6/+7
| | | | llvm-svn: 47464
* Return "Unknown" when using the value of a function pointer whose valueTed Kremenek2008-02-211-1/+5
| | | | | | is symbolic. llvm-svn: 47463
* Added transfer function support for dispatching to functions we don't knowTed Kremenek2008-02-211-4/+14
| | | | | | | about. The default logic is to invalidate the values of all values passed-by-reference. llvm-svn: 47456
* RemoveDeadBindings should now check for UninitalizedVal, as it is a nowTed Kremenek2008-02-211-2/+9
| | | | | | an error to cast it to LVal. llvm-svn: 47450
OpenPOWER on IntegriCloud