[clang-tools-extra] [clang-tidy] Add `modernize-use-bit-cast` check (PR #189962)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 25 06:33:15 PDT 2026


================
@@ -0,0 +1,22 @@
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-bit-cast %t
+
+void *memcpy(void *To, const void *From, int Size);
+
+namespace std {
+void *memcpy(void *To, const void *From, __SIZE_TYPE__ Size);
+}
----------------
zwuis wrote:

Move it to `clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/std/cstddef` and `clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/std/stddef.h`, then `#include <cstddef>`.

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


More information about the cfe-commits mailing list