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

Zhongxing Xu xuzhongxing at gmail.com
Fri Dec 17 21:16:43 PST 2010


Author: zhongxingxu
Date: Fri Dec 17 23:16:43 2010
New Revision: 122146

URL: http://llvm.org/viewvc/llvm-project?rev=122146&view=rev
Log:
The evaluation of dereference and address-of is identical.

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=122146&r1=122145&r2=122146&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Fri Dec 17 23:16:43 2010
@@ -2804,6 +2804,7 @@
       assert(!U->isLValue());
       // FALL-THROUGH.
     case UO_Deref:
+    case UO_AddrOf:
     case UO_Extension: {
 
       // Unary "+" is a no-op, similar to a parentheses.  We still have places
@@ -2823,20 +2824,6 @@
       return;
     }
 
-    case UO_AddrOf: {
-      assert(!U->isLValue());
-      const Expr* Ex = U->getSubExpr()->IgnoreParens();
-      ExplodedNodeSet Tmp;
-      Visit(Ex, Pred, Tmp);
-      for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
-        const GRState* state = GetState(*I);
-        SVal V = state->getSVal(Ex);
-        state = state->BindExpr(U, V);
-        MakeNode(Dst, U, *I, state);
-      }
-      return;
-    }
-
     case UO_LNot:
     case UO_Minus:
     case UO_Not: {





More information about the cfe-commits mailing list