From 52f379500f4290efaf425a9a5cbc631e2e48a559 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 11 Apr 2008 22:07:59 +0000 Subject: [PATCH] Added "EvalEndPath" to GRTransferFuncs: the default implementation does not change the state (and thus the GREndPathNodeBuilder automatically contructs a node). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49563 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Analysis/PathSensitive/GRExprEngine.h | 4 +++- include/clang/Analysis/PathSensitive/GRTransferFuncs.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/clang/Analysis/PathSensitive/GRExprEngine.h b/include/clang/Analysis/PathSensitive/GRExprEngine.h index 1c813dfd89..fc83dcb189 100644 --- a/include/clang/Analysis/PathSensitive/GRExprEngine.h +++ b/include/clang/Analysis/PathSensitive/GRExprEngine.h @@ -367,7 +367,9 @@ public: /// ProcessEndPath - Called by GRCoreEngine. Used to generate end-of-path /// nodes when the control reaches the end of a function. - void ProcessEndPath(EndPathNodeBuilder& builder) {} + void ProcessEndPath(EndPathNodeBuilder& builder) { + TF->EvalEndPath(*this, builder); + } ValueStateManager& getStateManager() { return StateMgr; } const ValueStateManager& getStateManger() const { return StateMgr; } diff --git a/include/clang/Analysis/PathSensitive/GRTransferFuncs.h b/include/clang/Analysis/PathSensitive/GRTransferFuncs.h index 9c68f20e74..14d4c87676 100644 --- a/include/clang/Analysis/PathSensitive/GRTransferFuncs.h +++ b/include/clang/Analysis/PathSensitive/GRTransferFuncs.h @@ -65,6 +65,11 @@ public: GRStmtNodeBuilder& Builder, CallExpr* CE, LVal L, ExplodedNode* Pred) = 0; + + // End-of-path. + + virtual void EvalEndPath(GRExprEngine& Engine, + GREndPathNodeBuilder& Builder) {} }; } // end clang namespace -- 2.40.0