diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-15 00:52:26 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-15 00:52:26 +0000 |
commit | bc0ba39a1eed7ebfa026b15a234ba2d20cf952f7 (patch) | |
tree | 766cb838d1972da1d1613a7b8886e72485b4da40 /clang/Analysis/GRExprEngine.cpp | |
parent | e161afc4dd89357b94f8b7247029b1cbf8774e0b (diff) | |
download | bcm5719-llvm-bc0ba39a1eed7ebfa026b15a234ba2d20cf952f7.tar.gz bcm5719-llvm-bc0ba39a1eed7ebfa026b15a234ba2d20cf952f7.zip |
Added boilerplate transfer function support for pointer arithmetic operations.
llvm-svn: 47147
Diffstat (limited to 'clang/Analysis/GRExprEngine.cpp')
-rw-r--r-- | clang/Analysis/GRExprEngine.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/Analysis/GRExprEngine.cpp b/clang/Analysis/GRExprEngine.cpp index 15f1aa2e373..bbf06d92fc5 100644 --- a/clang/Analysis/GRExprEngine.cpp +++ b/clang/Analysis/GRExprEngine.cpp @@ -706,9 +706,17 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B, if (isa<LValue>(V1)) { // FIXME: Add support for RHS being a non-lvalue. const LValue& L1 = cast<LValue>(V1); - const LValue& L2 = cast<LValue>(V2); - Nodify(Dst, B, N2, SetValue(St, B, EvalBinaryOp(ValMgr, Op, L1, L2))); + if (isa<LValue>(V2)) { + const LValue& L2 = cast<LValue>(V2); + Nodify(Dst, B, N2, SetValue(St, B, + EvalBinaryOp(ValMgr, Op, L1, L2))); + } + else { + const NonLValue& R2 = cast<NonLValue>(V2); + Nodify(Dst, B, N2, SetValue(St, B, + EvalBinaryOp(ValMgr, Op, L1, R2))); + } } else { const NonLValue& R1 = cast<NonLValue>(V1); |