aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-30 22:01:29 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-30 22:01:29 +0000
commit12e6f0341208099b80e8f6e779cc266d09702cf2 (patch)
treeba101ada4992f8f5e4c97a375048cebf916dcf6a /lib/Analysis/GRExprEngine.cpp
parent2cc782f7932f1069d9fa8bb5c518165802aad68d (diff)
Tighten computation of ExprVal using ?: expression. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 284fae8675..2ac10bbb6e 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/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.