[all-commits] [llvm/llvm-project] 41fc4d: [Clang][Sema] Add fortify warnings for strlcpy (#2...
Venkatesh Srinivasan via All-commits
all-commits at lists.llvm.org
Thu Sep 10 06:26:50 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 41fc4d5609d5f2414a2bbf9cf7e1ecd09fe5a01a
https://github.com/llvm/llvm-project/commit/41fc4d5609d5f2414a2bbf9cf7e1ecd09fe5a01a
Author: Venkatesh Srinivasan <156861430+venk-ks at users.noreply.github.com>
Date: 2026-09-10 (Thu, 10 Sep 2026)
Changed paths:
M clang/docs/ReleaseNotes.md
M clang/include/clang/Basic/Builtins.td
M clang/lib/AST/Decl.cpp
M clang/lib/Sema/SemaChecking.cpp
M clang/test/Sema/builtins.c
M clang/test/Sema/warn-fortify-source.c
M clang/test/Sema/warn-strlcpycat-size.c
Log Message:
-----------
[Clang][Sema] Add fortify warnings for strlcpy (#221325)
Add `-Wfortify-source` diagnostics for `strlcpy` and `__builtin_strlcpy`
when the size argument exceeds the destination buffer size.
This is directly analogous to the previous PR for `strlcat` (#220341).
Also update `clang/test/Sema/warn-strlcpycat-size.c` and
`clang/test/Sema/builtins.c` to expect the `-Wfortify-source` warnings
where test calls pass sizes larger than the destination buffer capacity.
Part of #142230
Assisted-by: Gemini
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list