diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-09-11 22:07:28 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-09-11 22:07:28 +0000 |
commit | 7020eae07673210f88e0e7b382284427db555548 (patch) | |
tree | 524fb7e6a407d21529618741a95c9f10817ecb6f /clang/lib/Analysis/SimpleSValuator.cpp | |
parent | c74e09f6546490dfd4be03dff06a81c8fa45b08e (diff) | |
download | bcm5719-llvm-7020eae07673210f88e0e7b382284427db555548.tar.gz bcm5719-llvm-7020eae07673210f88e0e7b382284427db555548.zip |
Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a way
to statically type various methods in SValuator/GRState as required either a
defined value or a defined-but-possibly-unknown value. This leads to various
logic cleanups in GRExprEngine, and lets the compiler enforce via type checking
our assumptions about what symbolic values are possibly undefined and what are
not.
Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values.
llvm-svn: 81579
Diffstat (limited to 'clang/lib/Analysis/SimpleSValuator.cpp')
-rw-r--r-- | clang/lib/Analysis/SimpleSValuator.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/Analysis/SimpleSValuator.cpp b/clang/lib/Analysis/SimpleSValuator.cpp index 442845a7c50..6d944da45b0 100644 --- a/clang/lib/Analysis/SimpleSValuator.cpp +++ b/clang/lib/Analysis/SimpleSValuator.cpp @@ -97,8 +97,6 @@ SVal SimpleSValuator::EvalCastL(Loc val, QualType castTy) { // can be introduced by the frontend for corner cases, e.g // casting from va_list* to __builtin_va_list&. // - assert(!val.isUnknownOrUndef()); - if (Loc::IsLocType(castTy) || castTy->isReferenceType()) return val; @@ -202,10 +200,6 @@ static SVal EvalEquality(ValueManager &ValMgr, Loc lhs, Loc rhs, bool isEqual, SVal SimpleSValuator::EvalBinOpNN(BinaryOperator::Opcode op, NonLoc lhs, NonLoc rhs, QualType resultTy) { - - assert(!lhs.isUnknownOrUndef()); - assert(!rhs.isUnknownOrUndef()); - // Handle trivial case where left-side and right-side are the same. if (lhs == rhs) switch (op) { |