summaryrefslogtreecommitdiffstats
path: root/clang/Analysis/GRExprEngine.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix bug when processing '?' operator: invalidate the old "Uninitialized" ↵Ted Kremenek2008-02-261-2/+4
| | | | | | value of the block-level expression for ?. llvm-svn: 47645
* 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-261-1/+5
| | | | | | | Use custom diagnostics for static analysis checkers. Added warnings for dereferencing uninitialized values and divide-by-zeroes. llvm-svn: 47626
* Small fixes to shore up overhauling of transfer function logic for '&&' and '||.Ted Kremenek2008-02-261-2/+9
| | | | llvm-svn: 47620
* optimization: no longer create ExplodedNodes for IntegerLiteral andTed Kremenek2008-02-261-27/+2
| | | | | | CharacterLiteral expressions. llvm-svn: 47617
* Major cleanup of the transfer function logic for '&&', '||', and '?'. WeTed Kremenek2008-02-261-53/+109
| | | | | | | | 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-261-9/+62
| | | | | | 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
* Better handling of calls to functions via function pointers.Ted Kremenek2008-02-251-3/+5
| | | | llvm-svn: 47562
* 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 transfer function support for checking for divide-by-zero errors.Ted Kremenek2008-02-251-1/+55
| | | | llvm-svn: 47547
* Added "assumption" logic for lval::FuncVal and lval::GotoLabel, and simplifiedTed Kremenek2008-02-221-0/+2
| | | | | | 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
* 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
* 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
* 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-211-6/+14
| | | | | | | | | 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-211-270/+329
| | | | | | | | | | | | | | | | 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-201-0/+6
| | | | llvm-svn: 47357
* Placed transfer function logic for dereferences in its own method, while atTed Kremenek2008-02-201-85/+130
| | | | | | the same time clearing up some logic of how the unary '*' operator is processed. llvm-svn: 47356
* Added special handling for UninitializedVals for the transfer function logicTed Kremenek2008-02-191-0/+20
| | | | | | for pointer dereferences. llvm-svn: 47340
* 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-191-2/+3
| | | | llvm-svn: 47333
* Added back explicit state/node creation when visiting IntegerLiterals andTed Kremenek2008-02-191-1/+26
| | | | | | | | 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-191-10/+55
| | | | 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-191-13/+33
| | | | | | | | | 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-181-7/+28
| | | | | | UninitializedVals and UnknownVals. llvm-svn: 47288
* Refactored code for transfer functions for binary operators involving two ↵Ted Kremenek2008-02-151-5/+10
| | | | | | | | | | | | 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-151-69/+28
| | | | | | | | | 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-151-2/+10
| | | | llvm-svn: 47147
* When visualizing ExplodedNodes created by GRExprEngine, color nodes withTed Kremenek2008-02-141-1/+10
| | | | | | null-dereferences or bad control-flow red. llvm-svn: 47140
* Renamed GRConstants => GRSimpleVals.Ted Kremenek2008-02-141-32/+8
| | | | | | 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-141-20/+29
| | | | | | from RValues to GRTransferFuncs/GRSimpleVals. llvm-svn: 47131
* Migrated transfer functions for unary "~" and "-" to ↵Ted Kremenek2008-02-141-2/+10
| | | | | | GRTransferFuncs/GRSimpleVals. llvm-svn: 47126
* Started partitioning of transfer function logic (and thus the policy behind Ted Kremenek2008-02-141-4/+20
| | | | | | | | | | 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-141-1/+0
| | | | llvm-svn: 47123
* Added support to GRCoreEngine/GRExprEngine for processing control-flowTed Kremenek2008-02-131-5/+127
| | | | | | 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-131-0/+1415
http://llvm.org/viewvc/llvm-project?rev=47070&view=rev llvm-svn: 47071
OpenPOWER on IntegriCloud