[clang] [Clang][Sema] Add fortify warnings for bcopy and bzero (#168965) (PR #186522)
Sharjeel Khan via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 6 21:58:18 PDT 2026
================
@@ -508,7 +508,8 @@ void bcopy2 (void) {
char src[] = {1, 2, 3, 4};
char dst[1];
- bcopy(src, dst, 4); // expected-warning{{overflow}}
+ bcopy(src, dst, 4); // expected-warning {{Memory copy function overflows the destination buffer}}
----------------
Sharjeel-Khan wrote:
Thanks for letting me know
https://github.com/llvm/llvm-project/pull/186522
More information about the cfe-commits
mailing list