PR4700 - remove shift by 0 warning
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78488 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index cec1aea..f00ab54 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -4136,16 +4136,7 @@
llvm::APSInt Right;
// Check right/shifter operand
if (rex->isIntegerConstantExpr(Right, Context)) {
- // Check left/shiftee operand
- llvm::APSInt Left;
- if (lex->isIntegerConstantExpr(Left, Context)) {
- if (Left == 0 && Right != 0)
- Diag(Loc, diag::warn_op_no_effect)
- << lex->getSourceRange() << rex->getSourceRange();
- }
- if (isCompAssign && Right == 0)
- Diag(Loc, diag::warn_op_no_effect) << rex->getSourceRange();
- else if (Right.isNegative())
+ if (Right.isNegative())
Diag(Loc, diag::warn_shift_negative) << rex->getSourceRange();
else {
llvm::APInt LeftBits(Right.getBitWidth(),