[PATCH] D16310: new clang-tidy checker misc-long-cast

Daniel Marjamäki via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 05:50:15 PST 2016


danielmarjamaki added inline comments.

================
Comment at: clang-tidy/misc/MisplacedWideningCastCheck.cpp:79
@@ +78,3 @@
+
+void MisplacedWideningCastCheck::check(const MatchFinder::MatchResult &Result) {
+  const auto *Cast = Result.Nodes.getNodeAs<ExplicitCastExpr>("Cast");
----------------
I looked in another checker , that did not have a condition nor assert so I removed it.

================
Comment at: clang-tidy/misc/MisplacedWideningCastCheck.h:17
@@ +16,3 @@
+namespace tidy {
+namespace misc {
+
----------------
I have rerun add_new_check.py for my latest patch.

================
Comment at: docs/clang-tidy/checks/misc-misplaced-widening-cast.rst:5
@@ +4,3 @@
+============================
+
+This check will warn when there is a explicit redundant cast of a calculation
----------------
yes good catch.


http://reviews.llvm.org/D16310





More information about the cfe-commits mailing list