aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index cec1aeafac..f00ab5412d 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -4136,16 +4136,7 @@ QualType Sema::CheckShiftOperands(Expr *&lex, Expr *&rex, SourceLocation Loc,
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(),