diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-15 16:36:04 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-15 16:36:04 +0000 |
commit | 2cd889d6d97db0cf73930873871aa4a542e84b89 (patch) | |
tree | 69b138b321dc6d3e7e834aea8269d066a702e6c8 /lib/Sema/SemaChecking.cpp | |
parent | b7e86be4412635d34b2bf161e1b8bbf00be055c9 (diff) |
c: add the missing binary operatory when checking
for integer overflow. // rdar://13423975
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index be0480b9f1..3926f01ea6 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -5188,7 +5188,7 @@ void Sema::CheckImplicitConversions(Expr *E, SourceLocation CC) { void Sema::CheckForIntOverflow (Expr *E) { if (const BinaryOperator *BExpr = dyn_cast<BinaryOperator>(E->IgnoreParens())) { unsigned Opc = BExpr->getOpcode(); - if (Opc != BO_Add && Opc != BO_Sub && Opc != BO_Mul) + if (Opc != BO_Add && Opc != BO_Sub && Opc != BO_Mul && Opc != BO_Div) return; llvm::SmallVector<PartialDiagnosticAt, 4> Diags; E->EvaluateForOverflow(Context, &Diags); |