etienneb updated this revision to Diff 63020.
etienneb marked 2 inline comments as done.
etienneb added a comment.
nits
http://reviews.llvm.org/D21392
Files:
clang-tidy/misc/RedundantExpressionCheck.cpp
clang-tidy/misc/RedundantExpressionCheck.h
test/clang-tidy/misc-redundant-expression.c
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
A couple of nits. Otherwise looks good. Thanks!
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:232
@@ +231,3 @@
+
+static bool rangeSubsumeRange(BinaryOperatorKind O
etienneb added inline comments.
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:27
@@ -25,1 +26,3 @@
+static bool incrementWithoutOverflow(const llvm::APSInt &Value,
+ llvm::APSInt &Result) {
aaron.ballman wrote:
> I
etienneb updated this revision to Diff 61984.
etienneb marked 12 inline comments as done.
etienneb added a comment.
address comments
http://reviews.llvm.org/D21392
Files:
clang-tidy/misc/RedundantExpressionCheck.cpp
clang-tidy/misc/RedundantExpressionCheck.h
test/clang-tidy/misc-redundant
alexfh added a comment.
A few nits.
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:135
@@ +134,3 @@
+ llvm::APSInt ValueLHS_plus1;
+ if (((OpcodeLHS == BO_LE && OpcodeRHS == BO_LT) ||
+ (OpcodeLHS == BO_GT && OpcodeRHS == BO_GE)) &&
How about r
aaron.ballman added inline comments.
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:27
@@ -25,1 +26,3 @@
+static bool incrementWithoutOverflow(const llvm::APSInt &Value,
+ llvm::APSInt &Result) {
I think this could b
etienneb updated this revision to Diff 60983.
etienneb added a comment.
refactoring
http://reviews.llvm.org/D21392
Files:
clang-tidy/misc/RedundantExpressionCheck.cpp
clang-tidy/misc/RedundantExpressionCheck.h
test/clang-tidy/misc-redundant-expression.cpp
Index: test/clang-tidy/misc-redu
etienneb added a comment.
thx Aaron.
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:131
@@ +130,3 @@
+
+ // Handle the case where constants are off by one: x <= 4 <==> x < 5.
+ llvm::APSInt ValueLHS_plus1 = ValueLHS;
aaron.ballman wrote:
> Why is o
etienneb updated this revision to Diff 60982.
etienneb marked 7 inline comments as done.
etienneb added a comment.
address comments
http://reviews.llvm.org/D21392
Files:
clang-tidy/misc/RedundantExpressionCheck.cpp
clang-tidy/misc/RedundantExpressionCheck.h
test/clang-tidy/misc-redundant-
aaron.ballman added inline comments.
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:114
@@ -112,1 +113,3 @@
+// Perform a comparison bitween APSInt with respect to bit-width and
signedness.
+static int compareValues(const llvm::APSInt &ValueLHS,
s/bit
10 matches
Mail list logo