From: Zhongxing Xu Date: Mon, 27 Oct 2008 09:00:08 +0000 (+0000) Subject: Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d03eea038271ab3a3be73e11c8fd7852effcf7f7;p=clang Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when a function pointer is used as an argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58233 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRSimpleVals.cpp b/lib/Analysis/GRSimpleVals.cpp index a2a59f3e92..48b25a71f9 100644 --- a/lib/Analysis/GRSimpleVals.cpp +++ b/lib/Analysis/GRSimpleVals.cpp @@ -369,7 +369,7 @@ void GRSimpleVals::EvalCall(ExplodedNodeSet& Dst, SVal V = StateMgr.GetSVal(St, *I); - if (isa(V)) + if (isa(V)) St = StateMgr.SetSVal(St, cast(V), UnknownVal()); else if (isa(V)) St = StateMgr.SetSVal(St, cast(V).getLoc(),