[clang] [Clang] Detect bit copies that should be relocation. (PR #139104)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 9 07:22:33 PDT 2025
================
@@ -853,6 +853,13 @@ def warn_cxxstruct_memaccess : Warning<
"first argument in call to "
"%0 is a pointer to non-trivially copyable type %1">,
InGroup<NonTrivialMemcall>;
+
+def warn_cxxstruct_memaccess_relocatable
+ : Warning<"calling %0 with a pointer to a type %1 which is trivially "
+ "relocatable "
+ "but not trivially copyable; did you mean to call %2?">,
----------------
Sirraide wrote:
```suggestion
"but not trivially copyable; did you mean to call '%2'?">,
```
This one needs to be quoted manually because it’s just a `StringRef`.
https://github.com/llvm/llvm-project/pull/139104
More information about the cfe-commits
mailing list