]> granicus.if.org Git - clang/commitdiff
Code cleanup. No functional change.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 28 Nov 2008 08:34:30 +0000 (08:34 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 28 Nov 2008 08:34:30 +0000 (08:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60206 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index 7c34fb91d2f0174e78e42325cadcb7f629df6117..ee6b0202406b3c5715d5381443dde82088c4b007 100644 (file)
@@ -982,6 +982,7 @@ void GRExprEngine::EvalLoad(NodeSet& Dst, Expr* Ex, NodeTy* Pred,
 
   // FIXME: The "CheckOnly" option exists only because Array and Field
   //  loads aren't fully implemented.  Eventually this option will go away.
+  assert(!CheckOnly);
 
   if (CheckOnly)
     MakeNode(Dst, Ex, Pred, St, K);
@@ -989,9 +990,10 @@ void GRExprEngine::EvalLoad(NodeSet& Dst, Expr* Ex, NodeTy* Pred,
     // This is important.  We must nuke the old binding.
     MakeNode(Dst, Ex, Pred, BindExpr(St, Ex, UnknownVal()), K);
   }
-  else    
-    MakeNode(Dst, Ex, Pred, BindExpr(St, Ex, GetSVal(St, cast<Loc>(location),
-                                                     Ex->getType())), K);  
+  else {
+    SVal V = GetSVal(St, cast<Loc>(location), Ex->getType());
+    MakeNode(Dst, Ex, Pred, BindExpr(St, Ex, V), K);  
+  }
 }
 
 void GRExprEngine::EvalStore(NodeSet& Dst, Expr* Ex, Expr* StoreE, NodeTy* Pred,