Remove ProgramPoint parameter from GenericNodeBuilder::generateNode().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123240 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h
index 36e4016..9656803 100644
--- a/include/clang/Analysis/ProgramPoint.h
+++ b/include/clang/Analysis/ProgramPoint.h
@@ -119,6 +119,12 @@
     return B->empty() ? CFGElement() : B->front();
   }
   
+  /// Create a new BlockEntrance object that is the same as the original
+  /// except for using the specified tag value.
+  BlockEntrance withTag(const void *tag) {
+    return BlockEntrance(getBlock(), getLocationContext(), tag);
+  }
+  
   static bool classof(const ProgramPoint* Location) {
     return Location->getKind() == BlockEntranceKind;
   }
diff --git a/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h
index 44a321c..bc920d5 100644
--- a/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h
+++ b/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h
@@ -428,18 +428,19 @@
   }
 };
 
-template <typename PP>
+template <typename PP_T>
 class GenericNodeBuilder : public GenericNodeBuilderImpl {
 public:
-  GenericNodeBuilder(CoreEngine &eng, ExplodedNode *pr, const PP &p)
+  GenericNodeBuilder(CoreEngine &eng, ExplodedNode *pr, const PP_T &p)
     : GenericNodeBuilderImpl(eng, pr, p) {}
 
   ExplodedNode *generateNode(const GRState *state, ExplodedNode *pred,
-                             PP programPoint, bool asSink) {
-    return generateNodeImpl(state, pred, programPoint, asSink);
+                             const void *tag, bool asSink) {
+    return generateNodeImpl(state, pred, cast<PP_T>(pp).withTag(tag),
+                            asSink);
   }
   
-  const PP &getProgramPoint() const { return cast<PP>(pp); }
+  const PP_T &getProgramPoint() const { return cast<PP_T>(pp); }
 };
 
 class EndOfFunctionNodeBuilder {
diff --git a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
index e6d9d71..3f9eb1b 100644
--- a/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
@@ -1089,9 +1089,7 @@
                        block->getBlockID()) >= AMgr.getMaxVisit()) {
 
     static int tag = 0;
-    const BlockEntrance &BE = nodeBuilder.getProgramPoint();
-    BlockEntrance BE_tagged(BE.getBlock(), BE.getLocationContext(), &tag);
-    nodeBuilder.generateNode(pred->getState(), pred, BE_tagged, true);
+    nodeBuilder.generateNode(pred->getState(), pred, &tag, true);
   }
 }