[PATCH] D157227: [Clang] Don't add `undef` for `operator new` under -fno-exceptions.

DianQK via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 01:58:15 PDT 2023


DianQK added a comment.

In D157227#4564817 <https://reviews.llvm.org/D157227#4564817>, @nikic wrote:

> Removing noundef makes no sense to me, because the return value is noundef even under fno-exceptions. If we remove something, it should be the nonnull attribute, because that's what's actually being violated.

Return null on nonnull is poison. So I can also think that the noundef attribute is violated. I think the reason for keeping nonnull is to match the semantics of `operator new`. But that probably doesn't make sense either.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157227/new/

https://reviews.llvm.org/D157227



More information about the cfe-commits mailing list