From 1b47773e1fb6189c48e083a110274912218e8bcf Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Sat, 18 Dec 2010 05:16:43 +0000 Subject: [PATCH] The evaluation of dereference and address-of is identical. llvm-svn: 122146 --- clang/lib/Checker/GRExprEngine.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp index 6a383e2e4289..2977835f826a 100644 --- a/clang/lib/Checker/GRExprEngine.cpp +++ b/clang/lib/Checker/GRExprEngine.cpp @@ -2804,6 +2804,7 @@ void GRExprEngine::VisitUnaryOperator(const UnaryOperator* U, 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 @@ void GRExprEngine::VisitUnaryOperator(const UnaryOperator* U, 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: {