[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 18 10:16:06 PDT 2023


================
@@ -2732,6 +2732,16 @@ extern const internal::VariadicDynCastAllOfMatcher<Stmt, CastExpr> castExpr;
 extern const internal::VariadicDynCastAllOfMatcher<Stmt, CXXFunctionalCastExpr>
     cxxFunctionalCastExpr;
 
+/// Matches a builtin bit cast expression.
+///
+/// Example: Matches __builtin_bit_cast(double, i) in
+/// \code
+///   int64_t i = 100;
+///   double d = __builtin_bit_cast(double, i);
+/// \endcode
+extern const internal::VariadicDynCastAllOfMatcher<Stmt, BuiltinBitCastExpr>
----------------
PiotrZSL wrote:

if you add this thing here then, documentation for matchers need to be udpated, UT need to be created and this matcher need to be registred  so it would be visible in clang-query. And release notes for clang need to be updated to mention new matcher.

https://github.com/llvm/llvm-project/pull/69465


More information about the cfe-commits mailing list