[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 11:55:48 PDT 2024


================
@@ -0,0 +1,34 @@
+// RUN: %check_clang_tidy -std=c++20-or-later %s bugprone-bit-cast-pointers %t
+
+namespace std
+{
+template <typename To, typename From>
+To bit_cast(From from)
+{
+  // Dummy implementation for the purpose of the check.
----------------
5chmidti wrote:

nit: `check` -> `test`. `check` is an overloaded term here.

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


More information about the cfe-commits mailing list