From 89063af27f1268ca1a5c69eb96baa8f7948193db Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 21 Feb 2008 19:15:37 +0000 Subject: [PATCH] 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 --- Analysis/GRExprEngine.cpp | 12 ++++++++---- 1 file 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(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); -- 2.50.1