Ted Kremenek
074965c5cb
Further cleanup. Moved definitions for SymbolManager and ValueManager into
...
their own [.cpp;.h] files.
llvm-svn: 47201
2008-02-16 01:12:31 +00:00
Ted Kremenek
e81734b01c
Simplified transfer function logic for ++/-- operators.
...
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
2008-02-15 22:09:30 +00:00
Ted Kremenek
8e6f6e05c3
Added "symbol iterators" for RValues, allowing easy iteration over the symbols
...
referenced by an RValue, instead of having to query the type of the RValue.
Modified ValueState::RemoveDeadBindings to also prune dead symbols.
llvm-svn: 47142
2008-02-14 23:25:54 +00:00
Ted Kremenek
cf7cf8e8b0
Migrated transfer functions for binary operators for simple value tracking
...
from RValues to GRTransferFuncs/GRSimpleVals.
llvm-svn: 47131
2008-02-14 19:37:24 +00:00
Ted Kremenek
4bad8f7ad6
Migrated transfer functions for unary "~" and "-" to GRTransferFuncs/GRSimpleVals.
...
llvm-svn: 47126
2008-02-14 18:40:24 +00:00
Ted Kremenek
3ca942969e
Started partitioning of transfer function logic (and thus the policy behind
...
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
2008-02-14 18:28:23 +00:00
Ted Kremenek
747c777bde
Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".
...
llvm-svn: 47123
2008-02-14 17:30:51 +00:00
Ted Kremenek
736e441266
Added transfer function/value track logic for taking the address of a label.
...
llvm-svn: 47030
2008-02-12 21:37:56 +00:00
Ted Kremenek
fd39e73b7a
Implemented transfer functions for "<<" and ">>" when the RValues are
...
ConcreteInts.
llvm-svn: 46883
2008-02-08 07:14:58 +00:00
Ted Kremenek
fd641f1056
More variable renamings.
...
llvm-svn: 46875
2008-02-08 03:02:48 +00:00
Ted Kremenek
173743da67
Renamed InvalidValue to UnknownVal.
...
Renamed UninitializedValue to UninitializedVal.
llvm-svn: 46874
2008-02-08 02:57:34 +00:00
Ted Kremenek
e187d0511f
Added some more opcode pretty-printing.
...
Minor cleanups with generating nodes for NULL-pointer dereferences.
llvm-svn: 46851
2008-02-07 15:20:13 +00:00
Ted Kremenek
e324704e62
Added recording of "implicit" NULL dereferences of symbolic pointers.
...
llvm-svn: 46843
2008-02-07 05:48:01 +00:00
Chris Lattner
6bd4c7f94f
get the tree building again
...
llvm-svn: 46840
2008-02-07 05:01:42 +00:00
Ted Kremenek
43523e0fe8
Added transfer function logic for ReturnStmts.
...
Fixed insidious bug in handling dereferences.
llvm-svn: 46835
2008-02-07 01:08:27 +00:00
Ted Kremenek
cdd0be1dc1
Major code refactoring/cleanup with transfer function logic. Now the
...
code structure is more suitable for additional symbolic analysis.
llvm-svn: 46831
2008-02-06 22:50:25 +00:00
Ted Kremenek
17b65b557b
Added assumption logic for symbolic non-lvalues when used in conditions such as
...
"if(x)". On the true branch we know the value is != 0, and on the false branch
we know it is 0.
llvm-svn: 46814
2008-02-06 17:32:17 +00:00
Ted Kremenek
d17f05435a
Fixed signedness bug in cast transfer function when casting integers to pointers.
...
Removed lval::SymIntConstraintVal; wrappers for symbolic constraints are not lvalues (only integers that evaluate to !0 or 0).
llvm-svn: 46796
2008-02-06 04:31:33 +00:00
Ted Kremenek
38b32e976c
Added pretty-printing support for lval::SymIntConstraintVal and
...
nonlval::SymIntConstraintVal.
Reworked transfer function for '==' and '!=' for LValues to return
SymIntConstraintVal when comparing a symbol with a constant.
llvm-svn: 46778
2008-02-05 23:08:41 +00:00
Ted Kremenek
1e3fa134de
Moved subclasses of LValue and NonLValue into their own namespaces.
...
This noticeably cleans up the naming of these classes.
llvm-svn: 46770
2008-02-05 21:52:21 +00:00
Ted Kremenek
a4aa95bd9d
Added "SymIntConstraint", a utility class to represent intermediate values for
...
transfer function evaluation that represent constraints between symbolic values
and constant integers.
llvm-svn: 46769
2008-02-05 21:32:43 +00:00
Ted Kremenek
2cdfd6670e
Implemented transfer function for unary '~'.
...
llvm-svn: 46708
2008-02-04 16:58:30 +00:00
Ted Kremenek
effdafa62a
Implemented casts for ConcreteInt and ConcreteIntLValue.
...
Implemented '==' and '!=' for ConcreteIntLValue.
llvm-svn: 46630
2008-02-01 06:36:40 +00:00
Ted Kremenek
2838799859
Moved RValue code in GRConstants.cpp to RValue.[h,cpp].
...
Moved ValueKey/ValueMap declaration to ValueState.h.
llvm-svn: 46618
2008-01-31 19:34:24 +00:00