aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Analysis/PathSensitive/GRCoreEngine.h12
-rw-r--r--include/clang/Analysis/ProgramPoint.h3
-rw-r--r--lib/Analysis/GRCoreEngine.cpp13
3 files changed, 18 insertions, 10 deletions
diff --git a/include/clang/Analysis/PathSensitive/GRCoreEngine.h b/include/clang/Analysis/PathSensitive/GRCoreEngine.h
index 93c2884f8b..6a32a22a04 100644
--- a/include/clang/Analysis/PathSensitive/GRCoreEngine.h
+++ b/include/clang/Analysis/PathSensitive/GRCoreEngine.h
@@ -539,7 +539,9 @@ public:
return getBlockCounter().getNumVisited(B.getBlockID());
}
- ExplodedNodeImpl* generateNodeImpl(const void* State);
+ ExplodedNodeImpl* generateNodeImpl(const void* State,
+ const void *tag = 0,
+ ExplodedNodeImpl *P = 0);
CFGBlock* getBlock() const { return &B; }
};
@@ -571,9 +573,13 @@ public:
return getPredecessor()->getState();
}
- NodeTy* MakeNode(const StateTy* St) {
- return static_cast<NodeTy*>(NB.generateNodeImpl(St));
+ NodeTy* MakeNode(const StateTy* St, const void *tag = 0) {
+ return static_cast<NodeTy*>(NB.generateNodeImpl(St, tag));
}
+
+ NodeTy *generateNode(const StateTy *St, NodeTy *Pred, const void *tag = 0) {
+ return static_cast<NodeTy*>(NB.generateNodeImpl(St, tag, Pred));
+ }
};
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h
index 074a262038..8e6d5ec831 100644
--- a/include/clang/Analysis/ProgramPoint.h
+++ b/include/clang/Analysis/ProgramPoint.h
@@ -131,7 +131,8 @@ public:
class BlockEntrance : public ProgramPoint {
public:
- BlockEntrance(const CFGBlock* B) : ProgramPoint(B, BlockEntranceKind) {}
+ BlockEntrance(const CFGBlock* B, const void *tag = 0)
+ : ProgramPoint(B, BlockEntranceKind, tag) {}
CFGBlock* getBlock() const {
return reinterpret_cast<CFGBlock*>(getData1NoMask());
diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Analysis/GRCoreEngine.cpp
index 8bbf71e90a..c75fd9ace1 100644
--- a/lib/Analysis/GRCoreEngine.cpp
+++ b/lib/Analysis/GRCoreEngine.cpp
@@ -555,16 +555,17 @@ GREndPathNodeBuilderImpl::~GREndPathNodeBuilderImpl() {
if (!HasGeneratedNode) generateNodeImpl(Pred->State);
}
-ExplodedNodeImpl* GREndPathNodeBuilderImpl::generateNodeImpl(const void* State){
- HasGeneratedNode = true;
-
+ExplodedNodeImpl*
+GREndPathNodeBuilderImpl::generateNodeImpl(const void* State,
+ const void *tag,
+ ExplodedNodeImpl* P) {
+ HasGeneratedNode = true;
bool IsNew;
ExplodedNodeImpl* Node =
- Eng.G->getNodeImpl(BlockEntrance(&B), State, &IsNew);
+ Eng.G->getNodeImpl(BlockEntrance(&B, tag), State, &IsNew);
-
- Node->addPredecessor(Pred);
+ Node->addPredecessor(P ? P : Pred);
if (IsNew) {
Node->markAsSink();