From 5c2040b1820b04b51fcc092ddb69cb7295fc8d87 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 30 Oct 2009 22:01:29 +0000 Subject: [PATCH] Tighten computation of ExprVal using ?: expression. No functionality change. llvm-svn: 85618 --- clang/lib/Analysis/GRExprEngine.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 284fae8675ee..2ac10bbb6e31 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -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.