[analyzer] Remove PostStmtCustom ProgramPoint.  It can be represented using tagged PostStmts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137697 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h
index e9cc208..d0c6e71 100644
--- a/include/clang/Analysis/ProgramPoint.h
+++ b/include/clang/Analysis/ProgramPoint.h
@@ -45,7 +45,6 @@
               PreStoreKind,
               PostStoreKind,
               PostPurgeDeadSymbolsKind,
-              PostStmtCustomKind,
               PostConditionKind,
               PostLValueKind,
               PostInitializerKind,
@@ -207,27 +206,6 @@
   }
 };
 
-class PostStmtCustom : public PostStmt {
-public:
-  PostStmtCustom(const Stmt *S,
-                 const std::pair<const void*, const void*>* TaggedData,\
-                 const LocationContext *L)
-    : PostStmt(S, TaggedData, PostStmtCustomKind, L) {}
-
-  const std::pair<const void*, const void*>& getTaggedPair() const {
-    return
-      *reinterpret_cast<const std::pair<const void*, const void*>*>(getData2());
-  }
-
-  const void *getTag() const { return getTaggedPair().first; }
-
-  const void *getTaggedData() const { return getTaggedPair().second; }
-
-  static bool classof(const ProgramPoint* Location) {
-    return Location->getKind() == PostStmtCustomKind;
-  }
-};
-
 // PostCondition represents the post program point of a branch condition.
 class PostCondition : public PostStmt {
 public:
diff --git a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
index d5ec07a..5762a21 100644
--- a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
+++ b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
@@ -93,10 +93,9 @@
     ProgramPoint progPoint = node->getLocation();
     if (!isa<PostStmt>(progPoint))
       continue;
-
     // Condition 4.
     PostStmt ps = cast<PostStmt>(progPoint);
-    if (ps.getTag() || isa<PostStmtCustom>(ps))
+    if (ps.getTag())
       continue;
 
     if (isa<BinaryOperator>(ps.getStmt()))
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp
index b54927e..d55bddd 100644
--- a/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -1761,11 +1761,11 @@
 // Transfer function: Objective-C ivar references.
 //===----------------------------------------------------------------------===//
 
-static std::pair<const void*,const void*> EagerlyAssumeTag
-  = std::pair<const void*,const void*>(&EagerlyAssumeTag,static_cast<void*>(0));
-
 void ExprEngine::evalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
                                      const Expr *Ex) {
+  
+  static SimpleProgramPointTag EagerlyAssumeTag("ExprEngine : Eagerly Assume");
+  
   for (ExplodedNodeSet::iterator I=Src.begin(), E=Src.end(); I!=E; ++I) {
     ExplodedNode *Pred = *I;
 
@@ -1783,20 +1783,16 @@
     if (nonloc::SymExprVal *SEV = dyn_cast<nonloc::SymExprVal>(&V)) {
       // First assume that the condition is true.
       if (const ProgramState *stateTrue = state->assume(*SEV, true)) {
-        stateTrue = stateTrue->BindExpr(Ex,
-                                        svalBuilder.makeIntVal(1U, Ex->getType()));
-        Dst.Add(Builder->generateNode(PostStmtCustom(Ex,
-                                &EagerlyAssumeTag, Pred->getLocationContext()),
-                                      stateTrue, Pred));
+        SVal Val = svalBuilder.makeIntVal(1U, Ex->getType());        
+        stateTrue = stateTrue->BindExpr(Ex, Val);
+        Dst.Add(Builder->generateNode(Ex, stateTrue, Pred, &EagerlyAssumeTag));
       }
 
       // Next, assume that the condition is false.
       if (const ProgramState *stateFalse = state->assume(*SEV, false)) {
-        stateFalse = stateFalse->BindExpr(Ex,
-                                          svalBuilder.makeIntVal(0U, Ex->getType()));
-        Dst.Add(Builder->generateNode(PostStmtCustom(Ex, &EagerlyAssumeTag,
-                                                   Pred->getLocationContext()),
-                                      stateFalse, Pred));
+        SVal Val = svalBuilder.makeIntVal(0U, Ex->getType());
+        stateFalse = stateFalse->BindExpr(Ex, Val);
+        Dst.Add(Builder->generateNode(Ex, stateFalse, Pred, &EagerlyAssumeTag));
       }
     }
     else