[cfe-commits] r99268 - /cfe/trunk/lib/Checker/GRExprEngine.cpp

Zhongxing Xu xuzhongxing at gmail.com
Tue Mar 23 01:09:30 PDT 2010


Author: zhongxingxu
Date: Tue Mar 23 03:09:29 2010
New Revision: 99268

URL: http://llvm.org/viewvc/llvm-project?rev=99268&view=rev
Log:
Clear the return expr GDM after using it.

Modified:
    cfe/trunk/lib/Checker/GRExprEngine.cpp

Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=99268&r1=99267&r2=99268&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Tue Mar 23 03:09:29 2010
@@ -1329,6 +1329,8 @@
   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 @@
                                    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);





More information about the cfe-commits mailing list