]> granicus.if.org Git - clang/commitdiff
Tighten computation of ExprVal using ?: expression. No functionality change.
authorTed Kremenek <kremenek@apple.com>
Fri, 30 Oct 2009 22:01:29 +0000 (22:01 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 30 Oct 2009 22:01:29 +0000 (22:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85618 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index 284fae8675ee0862b1a524d7bd3d6fb5ebd2eab9..2ac10bbb6e31cdf5ec3fa904ae35df028a395f11 100644 (file)
@@ -2721,11 +2721,7 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
           RightV = ValMgr.getConjuredSymbolVal(NULL, B->getRHS(), Count);
         }
 
-        SVal ExprVal;
-        if (asLValue)
-          ExprVal = LeftV;
-        else
-          ExprVal = RightV;
+        SVal ExprVal = asLValue ? LeftV : RightV;
 
         // Simulate the effects of a "store":  bind the value of the RHS
         // to the L-Value represented by the LHS.