[clang] [Clang][Sema] Add fortify warnings for realpath (PR #230695)

Venkatesh Srinivasan via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 14:48:09 PST 2026


================
@@ -1059,6 +1059,11 @@ def warn_fortify_source_overread : Warning<
   "size %1, but the size is %2">,
   InGroup<FortifySource>;
 
+def warn_fortify_source_buffer_too_small : Warning<
+  "'%0' may overflow; destination buffer has size %1, but at least %2 bytes "
+  "are required">,
+  InGroup<FortifySource>;
----------------
venk-ks wrote:

Done in `5fea558006b6`: renamed to `warn_fortify_realpath_overflow`.

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


More information about the cfe-commits mailing list