Index: include/clang/Analysis/PathSensitive/GRTransferFuncs.h
===================================================================
--- include/clang/Analysis/PathSensitive/GRTransferFuncs.h	(revision 58754)
+++ include/clang/Analysis/PathSensitive/GRTransferFuncs.h	(working copy)
@@ -125,6 +125,12 @@
                                        bool& isFeasible) {
     return St;
   }
+
+  const GRState* setRegionSize(const GRState* state, const VarDecl* D,
+                               GRExprEngine& Eng) {
+    return state;
+  }
+
 };
   
 } // end clang namespace
Index: lib/Analysis/GRRegionVals.cpp
===================================================================
--- lib/Analysis/GRRegionVals.cpp	(revision 0)
+++ lib/Analysis/GRRegionVals.cpp	(revision 0)
@@ -0,0 +1,49 @@
+#include "GRSimpleVals.h"
+#include "clang/Analysis/PathSensitive/GRStateTrait.h"
+
+using namespace clang;
+
+namespace {
+
+class GRRegionVals : public GRSimpleVals {
+public:
+  const GRState* setRegionSize(const GRState* state, const VarDecl* D,
+                               GRExprEngine& Eng);
+};
+
+}
+
+typedef llvm::ImmutableMap<const MemRegion*, unsigned> RegionSizeTy;
+
+// GDM index tag.
+static int RegionSizeTyIndex = 0;
+
+namespace clang {
+template<>
+struct GRStateTrait<RegionSizeTy> : public GRStatePartialTrait<RegionSizeTy> {
+  static void* GDMIndex() { return &RegionSizeTyIndex; }
+};
+}
+
+const GRState* GRRegionVals::setRegionSize(const GRState* state, 
+                                           const VarDecl* D, 
+                                           GRExprEngine& Eng) {
+  // FIXME: size in bytes or the number of elements? 
+  unsigned Size = 0;
+
+  QualType T = D->getType();
+
+  if (Loc::IsLocType(T) || T->isIntegerType())
+    Size = 1;
+
+  else if (ConstantArrayType* CAT = dyn_cast<ConstantArrayType>(T.getTypePtr()))
+    Size = CAT->getSize().getZExtValue();
+
+  else
+    Size = 0; // To be implemented.
+
+  SVal V = Eng.getStateManager().GetLValue(state, D);
+  const MemRegion* R = cast<loc::MemRegionVal>(V).getRegion();
+  GRStateRef stref(state, Eng.getStateManager());
+  return stref.set<RegionSizeTy>(R, Size);
+}
Index: lib/Analysis/GRExprEngine.cpp
===================================================================
--- lib/Analysis/GRExprEngine.cpp	(revision 58754)
+++ lib/Analysis/GRExprEngine.cpp	(working copy)
@@ -1628,6 +1628,7 @@
   for (NodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
     const GRState* St = GetState(*I);
     St = StateMgr.BindDecl(St, VD, Ex, Builder->getCurrentBlockCount());
+    St = getTF().setRegionSize(St, VD, *this);
     MakeNode(Dst, DS, *I, St);
   }
 }
