aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Analysis/ProgramPoint.h6
-rw-r--r--include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h11
2 files changed, 12 insertions, 5 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h
index 36e40164c0..9656803b63 100644
--- a/include/clang/Analysis/ProgramPoint.h
+++ b/include/clang/Analysis/ProgramPoint.h
@@ -119,6 +119,12 @@ public:
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 44a321c2f7..bc920d5cb1 100644
--- a/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h
+++ b/include/clang/StaticAnalyzer/PathSensitive/CoreEngine.h
@@ -428,18 +428,19 @@ public:
}
};
-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 {