[clang] [Clang] Mark new as inaccessiblememonly if sane (PR #197199)
Nikolas Klauser via cfe-commits
cfe-commits at lists.llvm.org
Thu May 14 08:42:02 PDT 2026
philnik777 wrote:
> As a second commit, I've pushed a variant that also adds an `errnomem: write` effect, in order to match GCC documentation more closely. TBH I find the special provision for errno in this context somewhat odd (because as far as I know, `new` does not specify any specific behavior wrt errno, so this is just malloc behavior leaking through), but it's probably a good idea to match GCC semantics for the flag.
It's originally Clang's extension AFAIK, so I don't think we need to restrict ourselves to what GCC documents.
https://github.com/llvm/llvm-project/pull/197199
More information about the cfe-commits
mailing list