Index: include/clang/Analysis/PathSensitive/GRExprEngine.h
===================================================================
--- include/clang/Analysis/PathSensitive/GRExprEngine.h	（版本 58411）
+++ include/clang/Analysis/PathSensitive/GRExprEngine.h	（工作副本）
@@ -516,7 +516,9 @@
   
   /// VisitGuardedExpr - Transfer function logic for ?, __builtin_choose
   void VisitGuardedExpr(Expr* Ex, Expr* L, Expr* R, NodeTy* Pred, NodeSet& Dst);
-  
+
+  void VisitInitListExpr(InitListExpr* E, NodeTy* Pred, NodeSet& Dst);
+
   /// VisitLogicalExpr - Transfer function logic for '&&', '||'
   void VisitLogicalExpr(BinaryOperator* B, NodeTy* Pred, NodeSet& Dst);
   
Index: include/clang/Analysis/PathSensitive/BasicValueFactory.h
===================================================================
--- include/clang/Analysis/PathSensitive/BasicValueFactory.h	（版本 58411）
+++ include/clang/Analysis/PathSensitive/BasicValueFactory.h	（工作副本）
@@ -28,7 +28,25 @@
 namespace clang {
   
 class SVal;
-  
+
+class CompoundSValData : public llvm::FoldingSetNode {
+  QualType T;
+  unsigned NumSVals;
+  SVal* SVals;
+
+public:
+  CompoundSValData(QualType t, unsigned n, const SVal* Vals);
+
+  ~CompoundSValData();
+
+  static void Profile(llvm::FoldingSetNodeID& ID, QualType T, unsigned N, 
+                      const SVal* Vals);
+
+  void Profile(llvm::FoldingSetNodeID& ID) {
+    Profile(ID, T, NumSVals, SVals);
+  }
+};
+
 class BasicValueFactory {
   typedef llvm::FoldingSet<llvm::FoldingSetNodeWrapper<llvm::APSInt> >
           APSIntSetTy;
@@ -45,6 +63,8 @@
   void*         PersistentSVals;
   void*         PersistentSValPairs;
 
+  llvm::FoldingSet<CompoundSValData> CompoundSValDataSet;
+
 public:
   BasicValueFactory(ASTContext& ctx, llvm::BumpPtrAllocator& Alloc) 
   : Ctx(ctx), BPAlloc(Alloc), PersistentSVals(0), PersistentSValPairs(0) {}
@@ -68,6 +88,9 @@
   const SymIntConstraint& getConstraint(SymbolID sym, BinaryOperator::Opcode Op,
                                         const llvm::APSInt& V);
 
+  const CompoundSValData* getCompoundSValData(QualType T, unsigned NumSVals,
+                                              const SVal* SVals);
+
   const llvm::APSInt* EvaluateAPSInt(BinaryOperator::Opcode Op,
                                      const llvm::APSInt& V1,
                                      const llvm::APSInt& V2);
Index: include/clang/Analysis/PathSensitive/SVals.h
===================================================================
--- include/clang/Analysis/PathSensitive/SVals.h	（版本 58411）
+++ include/clang/Analysis/PathSensitive/SVals.h	（工作副本）
@@ -45,6 +45,7 @@
     : Data(D), Kind(k) {}
   
 public:
+  SVal() : Data(0), Kind(0) {}
   ~SVal() {};
   
   /// BufferTy - A temporary buffer to hold a set of SVals.
@@ -58,7 +59,7 @@
     ID.AddInteger((unsigned) getRawKind());
     ID.AddPointer(reinterpret_cast<void*>(Data));
   }
-  
+
   inline bool operator==(const SVal& R) const {
     return getRawKind() == R.getRawKind() && Data == R.Data;
   }
@@ -168,7 +169,10 @@
   static NonLoc MakeVal(BasicValueFactory& BasicVals, IntegerLiteral* I);
     
   static NonLoc MakeIntTruthVal(BasicValueFactory& BasicVals, bool b);
-    
+
+  static NonLoc MakeCompoundVal(QualType T, unsigned NumSVals, SVal* BegV,
+                                BasicValueFactory& BasicVals);
+
   // Implement isa<T> support.
   static inline bool classof(const SVal* V) {
     return V->getBaseKind() == NonLocKind;
@@ -210,7 +214,7 @@
 namespace nonloc {
   
 enum Kind { ConcreteIntKind, SymbolValKind, SymIntConstraintValKind,
-            LocAsIntegerKind };
+            LocAsIntegerKind, CompoundValKind };
 
 class SymbolVal : public NonLoc {
 public:
@@ -313,6 +317,24 @@
     return LocAsInteger(Vals.getPersistentSValWithData(V, Bits));
   }
 };
+
+class CompoundVal : public NonLoc {
+public:
+
+  CompoundVal(const CompoundSValData* D) : NonLoc(CompoundValKind, D) {}
+
+  const CompoundSValData* getValue() {
+    return static_cast<CompoundSValData*>(Data);
+  }
+
+  static bool classof(const SVal* V) {
+    return V->getBaseKind() == NonLocKind && V->getSubKind() == CompoundValKind;
+  }
+
+  static bool classof(const NonLoc* V) {
+    return V->getSubKind() == CompoundValKind;
+  }
+};
   
 } // end namespace clang::nonloc
 
Index: lib/Analysis/SVals.cpp
===================================================================
--- lib/Analysis/SVals.cpp	（版本 58411）
+++ lib/Analysis/SVals.cpp	（工作副本）
@@ -245,6 +245,11 @@
   return nonloc::ConcreteInt(BasicVals.getTruthValue(b));
 }
 
+NonLoc NonLoc::MakeCompoundVal(QualType T, unsigned NumSVals, SVal* BegV,
+                               BasicValueFactory& BasicVals) {
+  return nonloc::CompoundVal(BasicVals.getCompoundSValData(T, NumSVals, BegV));
+}
+
 SVal SVal::GetSymbolValue(SymbolManager& SymMgr, VarDecl* D) {
 
   QualType T = D->getType();
Index: lib/Analysis/BasicValueFactory.cpp
===================================================================
--- lib/Analysis/BasicValueFactory.cpp	（版本 58411）
+++ lib/Analysis/BasicValueFactory.cpp	（工作副本）
@@ -18,6 +18,25 @@
 
 using namespace clang;
 
+CompoundSValData::CompoundSValData(QualType t, unsigned n, const SVal* Vals)
+  : T(t), NumSVals(n) {
+  SVals = new SVal[n];
+  for (unsigned i = 0; i < n; ++i)
+    SVals[i] = Vals[i];
+}
+
+CompoundSValData::~CompoundSValData() {
+  delete[] SVals;
+}
+
+void CompoundSValData::Profile(llvm::FoldingSetNodeID& ID, QualType T, 
+                               unsigned N, const SVal* Vals) {
+  T.Profile(ID);
+  ID.AddInteger(N);
+  for (unsigned i = 0; i < N; ++i)
+    Vals[i].Profile(ID);
+}
+
 typedef std::pair<SVal, uintptr_t> SValData;
 typedef std::pair<SVal, SVal> SValPair;
 
@@ -106,6 +125,24 @@
   return *C;
 }
 
+const CompoundSValData* 
+BasicValueFactory::getCompoundSValData(QualType T, unsigned NumSVals,
+                                       const SVal* SVals) {
+  llvm::FoldingSetNodeID ID;
+  CompoundSValData::Profile(ID, T, NumSVals, SVals);
+  void* InsertPos;
+
+  CompoundSValData* D = CompoundSValDataSet.FindNodeOrInsertPos(ID, InsertPos);
+
+  if (!D) {
+    D = (CompoundSValData*) BPAlloc.Allocate<CompoundSValData>();
+    new (D) CompoundSValData(T, NumSVals, SVals);
+    CompoundSValDataSet.InsertNode(D, InsertPos);
+  }
+
+  return D;
+}
+
 const llvm::APSInt*
 BasicValueFactory::EvaluateAPSInt(BinaryOperator::Opcode Op,
                              const llvm::APSInt& V1, const llvm::APSInt& V2) {
Index: lib/Analysis/GRExprEngine.cpp
===================================================================
--- lib/Analysis/GRExprEngine.cpp	（版本 58411）
+++ lib/Analysis/GRExprEngine.cpp	（工作副本）
@@ -350,6 +350,10 @@
       VisitCast(C, C->getSubExpr(), Pred, Dst);
       break;
     }
+
+    case Stmt::InitListExprClass:
+      VisitInitListExpr(cast<InitListExpr>(S), Pred, Dst);
+      break;
       
     case Stmt::MemberExprClass:
       VisitMemberExpr(cast<MemberExpr>(S), Pred, Dst, false);
@@ -1615,7 +1619,68 @@
   }
 }
 
+void GRExprEngine::VisitInitListExpr(InitListExpr* E, NodeTy* Pred, 
+                                     NodeSet& Dst) {
+  const GRState* state = GetState(Pred);
 
+  QualType T = E->getType();
+
+  unsigned NumInitElements = E->getNumInits();
+
+  llvm::SmallVector<SVal, 10> InitVals;
+  InitVals.reserve(NumInitElements);
+  
+
+  if (T->isArrayType()) {
+    for (unsigned i = 0; i < NumInitElements; ++i) {
+      Expr* Init = E->getInit(i);
+      NodeSet Tmp;
+      Visit(Init, Pred, Tmp);
+
+      // We do not allow state splitting during Initializer visiting.
+      assert(Tmp.size() == 1);
+
+      // Get the new intermediate node and its state.
+      Pred = *Tmp.begin();
+      state = GetState(Pred);
+
+      SVal InitV = GetSVal(state, Init);
+      InitVals.push_back(InitV);
+    }
+
+    // Now we have a vector holding all init values. Make CompoundSValData.
+    SVal V = NonLoc::MakeCompoundVal(T, NumInitElements, &InitVals[0], 
+                                     StateMgr.getBasicVals());
+
+    // Make final state and node.
+    state = SetSVal(state, E, V);
+
+    MakeNode(Dst, E, Pred, state);
+    return;
+  }
+
+  if (T->isStructureType()) {
+    // FIXME: to be implemented.
+    MakeNode(Dst, E, Pred, state);
+    return;
+  }
+
+  if (Loc::IsLocType(T) || T->isIntegerType()) {
+    // FIXME: to be implemented.
+    MakeNode(Dst, E, Pred, state);
+    return;
+  }
+
+  if (T->isUnionType()) {
+    // FIXME: to be implemented.
+    MakeNode(Dst, E, Pred, state);
+    return;
+  }
+
+  printf("InitListExpr type = %s\n", T.getAsString().c_str());
+  assert(0 && "unprocessed InitListExpr type");
+}
+
 /// VisitSizeOfAlignOfTypeExpr - Transfer function for sizeof(type).
 void GRExprEngine::VisitSizeOfAlignOfTypeExpr(SizeOfAlignOfTypeExpr* Ex,
                                               NodeTy* Pred,
