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

Daniel Marjamäki via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 00:36:42 PST 2016


danielmarjamaki added a comment.

In http://reviews.llvm.org/D16310#337563, @LegalizeAdulthood wrote:

> In http://reviews.llvm.org/D16310#335844, @danielmarjamaki wrote:
>
> > There were some new interesting warnings and imho they were TP.
>
>
> TP?


Sorry.. True Positive


================
Comment at: clang-tidy/misc/MisplacedWideningCastCheck.cpp:32
@@ +31,3 @@
+  auto CXXReinterpretCastB = cxxReinterpretCastExpr(has(BinaryOp)).bind("cast");
+  auto CXXReinterpretCastU = cxxReinterpretCastExpr(has(UnaryOp)).bind("cast");
+
----------------
I would like to use a anyOf(cStyleCastExpr(..), cxxStaticCastExpr(..), ..) ... would that be possible somehow?

I would also like to use anyOf(binaryOperator(..), unaryOperator(..)) is that possible?


http://reviews.llvm.org/D16310





More information about the cfe-commits mailing list