[clang] [-Wunsafe-buffer-usage] Add check for custom printf/scanf functions (PR #173096)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 9 03:57:11 PST 2026
zmodem wrote:
With the assert fixed, the new warning is now firing *a lot* across Chromium, enough to make me wonder if there needs to be some migration path.
Many string formatting and logging routines are now implicitly opted in, but there's no good way of opting them out. Maybe there should be a `[[clang::no_unsafe_buffer_usage]]` to opt out functions which are not important (such as debug logging), or as a migration path until callers can be fixed or wrapped in `clang unsafe_buffer_usage begin` / `end`?
https://github.com/llvm/llvm-project/pull/173096
More information about the cfe-commits
mailing list