From d7c44059d489c8ac0d897024487b0d0b575f0d7f Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Mon, 27 Oct 2008 09:00:08 +0000 Subject: [PATCH] Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when a function pointer is used as an argument. llvm-svn: 58233 --- clang/lib/Analysis/GRSimpleVals.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Analysis/GRSimpleVals.cpp b/clang/lib/Analysis/GRSimpleVals.cpp index a2a59f3e929b..48b25a71f9df 100644 --- a/clang/lib/Analysis/GRSimpleVals.cpp +++ b/clang/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(),