[PATCH] D21392: [clang-tidy] Enhance redundant-expression check
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 4 01:52:20 PDT 2016
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 OpcodeLHS,
+ const APSInt &ValueLHS,
----------------
nit: rangeSubsumesRange (note: subsume -> subsumes)
================
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:283
@@ +282,3 @@
+matchIntegerConstantExpr(StringRef Id) {
+ std::string CstId = (Id + "-cst").str();
+ return expr(isIntegerConstantExpr()).bind(CstId);
----------------
nit: I'd prefer "const" instead of "cst": saving two characters doesn't change much, I guess, but the loss of clarity is substantial.
http://reviews.llvm.org/D21392
More information about the cfe-commits
mailing list