Fixed a bug where the values of block-level expressions were being recorded in
the value map as if the expressions were non-block-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46319 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/GRConstants.cpp b/Analysis/GRConstants.cpp
index 35758c6..9db8e7f 100644
--- a/Analysis/GRConstants.cpp
+++ b/Analysis/GRConstants.cpp
@@ -608,8 +608,7 @@
   ///  mappings removed.
   StateTy RemoveDeadBindings(Stmt* S, StateTy M);
 
-  StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V,
-                   bool isBlkExpr = false);
+  StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V);
 
   StateTy SetValue(StateTy St, const LValue& LV, const ExprValue& V);
   
@@ -726,13 +725,15 @@
 }
 
 GRConstants::StateTy GRConstants::SetValue(StateTy St, Stmt* S,
-                                           const ExprValue& V, bool isBlkExpr) {
+                                           const ExprValue& V) {
   
   if (!StateCleaned) {
     St = RemoveDeadBindings(CurrentStmt, St);
     StateCleaned = true;
   }
   
+  bool isBlkExpr = S == CurrentStmt && getCFG().isBlkExpr(S);
+  
   return V.isValid() ? StateMgr.Add(St, ValueKey(S,isBlkExpr), V)
                      : St;
 }