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 | bf2f0d74a20607a06e27be41262d2273b5594935 (patch) | |
| tree | 22a833d818a38d3dd03032afccf8f1750930afcc /clang/lib/Checker | |
| parent | 1ff3dcef1ff46c3fae68b6ad717797ae107f8683 (diff) | |
| download | bcm5719-llvm-bf2f0d74a20607a06e27be41262d2273b5594935.tar.gz bcm5719-llvm-bf2f0d74a20607a06e27be41262d2273b5594935.zip | |
Clear the return expr GDM after using it.
llvm-svn: 99268
Diffstat (limited to 'clang/lib/Checker')
| -rw-r--r-- | clang/lib/Checker/GRExprEngine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp index 553f949d87c..8ed57e70934 100644 --- a/clang/lib/Checker/GRExprEngine.cpp +++ b/clang/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); |

