From 319deb83d2a52bf788d0e724c8cd463cf9c576fd Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Thu, 4 Feb 2010 04:56:43 +0000 Subject: Cast evaluation no longer touch GRState. llvm-svn: 95290 --- clang/lib/Checker/RegionStore.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Checker/RegionStore.cpp') diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp index c350894036c..25e8059d263 100644 --- a/clang/lib/Checker/RegionStore.cpp +++ b/clang/lib/Checker/RegionStore.cpp @@ -1523,9 +1523,8 @@ const GRState *RegionStoreManager::Bind(const GRState *state, Loc L, SVal V) { if (IsAnyPointerOrIntptr(superTy, Ctx) && IsAnyPointerOrIntptr(erTy, Ctx)) { - SValuator::CastResult cr = - ValMgr.getSValuator().EvalCast(V, state, superTy, erTy); - return Bind(cr.getState(), loc::MemRegionVal(superR), cr.getSVal()); + V = ValMgr.getSValuator().EvalCast(V, superTy, erTy); + return Bind(state, loc::MemRegionVal(superR), V); } // For now, just invalidate the fields of the struct/union/class. // FIXME: Precisely handle the fields of the record. -- cgit v1.2.3