From 5588c9e9ced23a484387924abae447c4deda2953 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 25 Jan 2008 23:45:34 +0000 Subject: [PATCH] Implemented transfer function for '/='. llvm-svn: 46379 --- clang/Analysis/GRConstants.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/clang/Analysis/GRConstants.cpp b/clang/Analysis/GRConstants.cpp index 69a0d9320766..13d10f2d8bb1 100644 --- a/clang/Analysis/GRConstants.cpp +++ b/clang/Analysis/GRConstants.cpp @@ -1050,6 +1050,14 @@ void GRConstants::VisitBinaryOperator(BinaryOperator* B, Nodify(Dst, B, N2, SetValue(SetValue(St, B, Result), L1, Result)); break; } + + case BinaryOperator::DivAssign: { + const LValue& L1 = cast(V1); + RValue R1 = cast(GetValue(N1->getState(), L1)); + RValue Result = R1.EvalDiv(ValMgr, cast(V2)); + Nodify(Dst, B, N2, SetValue(SetValue(St, B, Result), L1, Result)); + break; + } default: Dst.Add(N2);