[clang] [compiler-rt] [libcxx] [clang] Add unistd fortify checks and analyzer size constraints (PR #196499)

Denys Fedoryshchenko via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 02:09:00 PDT 2026


================
@@ -536,7 +536,8 @@ int f262(void) {
   struct aa a262 = {{1, 2, 3, 4}, 0};
   a262.s2 = strdup("hello");
   char input[] = {'a', 'b', 'c', 'd'};
-  memcpy(a262.s1, input, -1); // expected-warning{{'memcpy' will always overflow; destination buffer has size 16, but size argument is 18446744073709551615}}
+  memcpy(a262.s1, input, -1); // expected-warning{{'memcpy' will always overflow; destination buffer has size 16, but size argument is 18446744073709551615}} \
----------------
nuclearcat wrote:

Sorry - I'd reflexively used \ to keep the directives on the source line after clang-format flagged length
forgot verify has its own @-N form for that. Fixing across the diff.

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


More information about the llvm-commits mailing list