[clang] [clang][sema] Add nonnull attribute to builtin format functions (PR #158626)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 22 05:01:21 PDT 2025
Sirraide wrote:
> What do actual libc implementations do when they are passed a nullptr? Do any of them define their behaviour?
Glibc at least checks for null and returns `-1`; I haven’t been able to check other libc implementations. I also tried looking at the C standard, but from what I can tell it doesn’t talk about this situation at all, though maybe I missed something
https://github.com/llvm/llvm-project/pull/158626
More information about the cfe-commits
mailing list