alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

Awesome idea!

LG with a couple of nits.

In http://reviews.llvm.org/D19451#410064, @etienneb wrote:

> Tested over LLVM code, no false positives.
>
> Two catches:
>  http://reviews.llvm.org/D19460
>  http://reviews.llvm.org/D19451


The second link refers to this revision ;)


================
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:21
@@ +20,3 @@
+
+static bool AreIdenticalExpr(const Expr *Left, const Expr *Right) {
+  if (!Left || !Right)
----------------
This is to some degree similar to comparing `llvm::FoldingSetNodeIDs` created 
using `Stmt::Profile`. However it's only useful to check for identical 
expressions and won't work, if you're going to extend this to equivalent 
expressions.

================
Comment at: docs/clang-tidy/checks/misc-redundant-expression.rst:10
@@ +9,3 @@
+  * redundant,
+  * always be true,
+  * always be false,
----------------
Please enclose `true` and `false` in backquotes.


http://reviews.llvm.org/D19451



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to