aboutsummaryrefslogtreecommitdiff
path: root/Analysis/RValues.cpp
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09Bug fix: Don't call RemoveDeadBindings more than once (can kill newly ↵Ted Kremenek
generated values to Block-Level Expressions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48079 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07Renamed ValueManager to BasicValueFactory.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-06fix typosGabor Greif
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05remove the source location arguments to various target query methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-28Added checking for undefined results of '<<' and '>>' (shifting by too many ↵Ted Kremenek
bits, etc.) This current implementation only works when both operands are concrete values; later we will add support for symbolic values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-28Renamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47713 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26Added lazy "symbolication" of parameter variables and global variables.Ted Kremenek
Added recording of divide-by-zero and divide-by-uninitialized nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47586 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21Major cleanup of path-sensitive analysis engine and the current analysisTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47441 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20Implemented transfer function logic for unary '+'Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47357 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20Placed transfer function logic for dereferences in its own method, while atTed Kremenek
the same time clearing up some logic of how the unary '*' operator is processed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47356 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-19Added boilerplate transfer function support for CallExprs.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47298 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Further cleanup. Moved definitions for SymbolManager and ValueManager intoTed Kremenek
their own [.cpp;.h] files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47201 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Simplified transfer function logic for ++/-- operators.Ted Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47183 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14Added "symbol iterators" for RValues, allowing easy iteration over the symbolsTed Kremenek
referenced by an RValue, instead of having to query the type of the RValue. Modified ValueState::RemoveDeadBindings to also prune dead symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14Migrated transfer functions for binary operators for simple value trackingTed Kremenek
from RValues to GRTransferFuncs/GRSimpleVals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47131 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14Migrated transfer functions for unary "~" and "-" to ↵Ted Kremenek
GRTransferFuncs/GRSimpleVals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47126 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14Started partitioning of transfer function logic (and thus the policy behind Ted Kremenek
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" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47125 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47123 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12Added transfer function/value track logic for taking the address of a label.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47030 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Implemented transfer functions for "<<" and ">>" when the RValues areTed Kremenek
ConcreteInts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46883 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08More variable renamings.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46875 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Renamed InvalidValue to UnknownVal.Ted Kremenek
Renamed UninitializedValue to UninitializedVal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46874 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Added some more opcode pretty-printing.Ted Kremenek
Minor cleanups with generating nodes for NULL-pointer dereferences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46851 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Added recording of "implicit" NULL dereferences of symbolic pointers.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07get the tree building againChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46840 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Added transfer function logic for ReturnStmts.Ted Kremenek
Fixed insidious bug in handling dereferences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46835 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06Major code refactoring/cleanup with transfer function logic. Now theTed Kremenek
code structure is more suitable for additional symbolic analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46831 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06Added assumption logic for symbolic non-lvalues when used in conditions such asTed Kremenek
"if(x)". On the true branch we know the value is != 0, and on the false branch we know it is 0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46814 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06Fixed signedness bug in cast transfer function when casting integers to ↵Ted Kremenek
pointers. Removed lval::SymIntConstraintVal; wrappers for symbolic constraints are not lvalues (only integers that evaluate to !0 or 0). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Added pretty-printing support for lval::SymIntConstraintVal andTed Kremenek
nonlval::SymIntConstraintVal. Reworked transfer function for '==' and '!=' for LValues to return SymIntConstraintVal when comparing a symbol with a constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Moved subclasses of LValue and NonLValue into their own namespaces.Ted Kremenek
This noticeably cleans up the naming of these classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Added "SymIntConstraint", a utility class to represent intermediate values forTed Kremenek
transfer function evaluation that represent constraints between symbolic values and constant integers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46769 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04Implemented transfer function for unary '~'.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-01Implemented casts for ConcreteInt and ConcreteIntLValue.Ted Kremenek
Implemented '==' and '!=' for ConcreteIntLValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Moved RValue code in GRConstants.cpp to RValue.[h,cpp].Ted Kremenek
Moved ValueKey/ValueMap declaration to ValueState.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46618 91177308-0d34-0410-b5e6-96231b3b80d8