Do not invalidate unboundable regions in GRSimpleVals::EvalCall().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73474 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp
index e1c4848..d8d312f 100644
--- a/lib/Analysis/GRSimpleVals.cpp
+++ b/lib/Analysis/GRSimpleVals.cpp
@@ -365,9 +365,11 @@
SVal V = StateMgr.GetSVal(St, *I);
- if (isa<loc::MemRegionVal>(V))
- St = StateMgr.BindLoc(St, cast<Loc>(V), UnknownVal());
- else if (isa<nonloc::LocAsInteger>(V))
+ if (isa<loc::MemRegionVal>(V)) {
+ const MemRegion *R = cast<loc::MemRegionVal>(V).getRegion();
+ if (R->isBoundable(Eng.getContext()))
+ St = StateMgr.BindLoc(St, cast<Loc>(V), UnknownVal());
+ } else if (isa<nonloc::LocAsInteger>(V))
St = StateMgr.BindLoc(St, cast<nonloc::LocAsInteger>(V).getLoc(),
UnknownVal());