diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-03-23 08:09:29 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-03-23 08:09:29 +0000 |
commit | bd2b2084e58577f17308f910770a5563a344251a (patch) | |
tree | b28ecc3736290bde55594137ec341083a4491a1c /lib/Checker/GRExprEngine.cpp | |
parent | 7b71c1977cccafa23f9ecb3b0b22199e61ae634c (diff) |
Clear the return expr GDM after using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
-rw-r--r-- | lib/Checker/GRExprEngine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index 553f949d87..8ed57e7093 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -1329,6 +1329,8 @@ void GRExprEngine::ProcessCallExit(GRCallExitNodeBuilder &B) { if (ReturnedExpr) { SVal RetVal = state->getSVal(ReturnedExpr); state = state->BindExpr(CE, RetVal); + // Clear the return expr GDM. + state = state->set<ReturnExpr>(0); } B.GenerateNode(state); @@ -2909,7 +2911,8 @@ void GRExprEngine::VisitReturnStmt(ReturnStmt *RS, ExplodedNode *Pred, ExplodedNodeSet &Dst) { ExplodedNodeSet Src; if (Expr *RetE = RS->getRetValue()) { - // Record the returned expression in the state. + // Record the returned expression in the state. It will be used in + // ProcessCallExit to bind the return value to the call expr. { static int Tag = 0; SaveAndRestore<const void *> OldTag(Builder->Tag, &Tag); |