etienneb added inline comments.
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:21
@@ +20,3 @@
+
+static bool AreIdenticalExpr(const Expr *Left, const Expr *Right) {
+ if (!Left || !Right)
alexfh wrote:
> This is to some degree similar to comparing `llvm
etienneb updated this revision to Diff 55028.
etienneb marked 2 inline comments as done.
etienneb added a comment.
address alexfh comments.
http://reviews.llvm.org/D19451
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/RedundantExpressionCheck.cpp
etienneb added a comment.
In http://reviews.llvm.org/D19451#412017, @alexfh wrote:
> In http://reviews.llvm.org/D19451#411990, @alexfh wrote:
>
> > BTW, have you seen the `alpha.core.IdenticalExpr` static analyzer checker?
>
>
> Anna, Jordan, and whoever else is interested in the
> `alpha.core.I
alexfh added a comment.
In http://reviews.llvm.org/D19451#411990, @alexfh wrote:
> BTW, have you seen the `alpha.core.IdenticalExpr` static analyzer checker?
Anna, Jordan, and whoever else is interested in the `alpha.core.IdenticalExpr`
checker (lib/StaticAnalyzer/Checkers/IdenticalExprChecker
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/D19
alexfh added a comment.
BTW, have you seen the `alpha.core.IdenticalExpr` static analyzer checker?
http://reviews.llvm.org/D19451
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
etienneb added a comment.
Tested over LLVM code, no false positives.
Two catches:
http://reviews.llvm.org/D19460
http://reviews.llvm.org/D19451
http://reviews.llvm.org/D19451
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm
etienneb updated this revision to Diff 54785.
etienneb added a comment.
addressed eugene requests.
http://reviews.llvm.org/D19451
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/RedundantExpressionCheck.cpp
clang-tidy/misc/RedundantExpressionChec
etienneb added a comment.
> Will check catch more complicated cases, like
[..]
It is not "yet" catching these cases:
if ((Point2.x > Point1.x) && (Point1.x < Point2.x)) ?
I believe the AreEquivalentExpression should be extended, and probably llifted
to utils.
Here again, I propose to do it i
etienneb added a comment.
In http://reviews.llvm.org/D19451#410014, @Eugene.Zelenko wrote:
> Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).
>
> Will check catch more complicated cases, like
>
> if ((Point1.x < Point2.x) && (Point1.x < Point2.x)) ?
It is catching t
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).
Will check catch more complicated cases, like
if ((Point1.x < Point2.x) && (Point1.x < Point2.x)) ?
Will be good idea to add such case
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
This checker finds redundant expression on both side of a binary operator.
The current implementation provide a function to check whether expression
are the equivalent. This implementation
12 matches
Mail list logo