aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Checker/GRState.cpp')
-rw-r--r--lib/Checker/GRState.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Checker/GRState.cpp b/lib/Checker/GRState.cpp
index 592f930316..ce7d6e2a83 100644
--- a/lib/Checker/GRState.cpp
+++ b/lib/Checker/GRState.cpp
@@ -23,6 +23,12 @@ using namespace clang;
// FIXME: Move this elsewhere.
ConstraintManager::~ConstraintManager() {}
+const GRState *GRState::setAnalysisContext(AnalysisContext *ctx) const {
+ GRState NewState = *this;
+ NewState.Env.setAnalysisContext(ctx);
+ return StateMgr->getPersistentState(NewState);
+}
+
GRStateManager::~GRStateManager() {
for (std::vector<GRState::Printer*>::iterator I=Printers.begin(),
E=Printers.end(); I!=E; ++I)