aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-21 19:15:37 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-21 19:15:37 +0000
commit89063af27f1268ca1a5c69eb96baa8f7948193db (patch)
tree5625479b75e081545c73c2fb453f68f00db3fe43
parent9258a645ea0879002cdb6b49fb85ec28305b01d6 (diff)
Removed bogus assertions regard LValues binding to UnknownVal; they can
do so implicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47447 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Analysis/GRExprEngine.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp
index c326df5499..16361c6d86 100644
--- a/Analysis/GRExprEngine.cpp
+++ b/Analysis/GRExprEngine.cpp
@@ -685,8 +685,10 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred,
LVal SubLV = cast<LVal>(SubV);
RVal V = GetRVal(St, SubLV, U->getType());
- // An LVal should never bind to UnknownVal.
- assert (!V.isUnknown());
+ if (V.isUnknown()) {
+ Dst.Add(N1);
+ continue;
+ }
// Propagate uninitialized values.
if (V.isUninit()) {
@@ -925,8 +927,10 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
// Propagate unknown values.
- assert (!V.isUnknown() &&
- "An LVal should never bind to UnknownVal");
+ if (V.isUnknown()) {
+ Dst.Add(N2);
+ continue;
+ }
if (RightV.isUnknown()) {
St = SetRVal(SetRVal(St, LeftLV, RightV), B, RightV);