Now initializer of C++ record type is visited as block-level expr. 
Let the destination of AggExprVisitor be an explicit MemRegion. 
Reenable the test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117908 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/GRCXXExprEngine.cpp b/lib/Checker/GRCXXExprEngine.cpp
index c6be6b6..8903876 100644
--- a/lib/Checker/GRCXXExprEngine.cpp
+++ b/lib/Checker/GRCXXExprEngine.cpp
@@ -91,9 +91,14 @@
   }
 }
 
-void GRExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *E, SVal Dest,
+void GRExprEngine::VisitCXXConstructExpr(const CXXConstructExpr *E, 
+                                         const MemRegion *Dest,
                                          ExplodedNode *Pred,
                                          ExplodedNodeSet &Dst) {
+  if (!Dest)
+    Dest = ValMgr.getRegionManager().getCXXObjectRegion(E,
+                                                    Pred->getLocationContext());
+
   if (E->isElidable()) {
     VisitAggExpr(E->getArg(0), Dest, Pred, Dst);
     return;
@@ -124,7 +129,7 @@
     const GRState *state = GetState(*NI);
     // Setup 'this' region, so that the ctor is evaluated on the object pointed
     // by 'Dest'.
-    state = state->bindLoc(loc::MemRegionVal(ThisR), Dest);
+    state = state->bindLoc(loc::MemRegionVal(ThisR), loc::MemRegionVal(Dest));
     ExplodedNode *N = Builder->generateNode(Loc, state, Pred);
     if (N)
       Dst.Add(N);