[all-commits] [llvm/llvm-project] 7d8c2a: [Clang] Do not apply inaccessiblememonly to ::oper...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Sep 20 23:52:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d8c2a2f3436df5c564b61b75cd472f2c4a18a7e
      https://github.com/llvm/llvm-project/commit/7d8c2a2f3436df5c564b61b75cd472f2c4a18a7e
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-09-21 (Mon, 21 Sep 2026)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGExprCXX.cpp
    M clang/test/CodeGenCXX/new_hot_cold.cpp
    M clang/test/CodeGenCXX/operator-new.cpp

  Log Message:
  -----------
  [Clang] Do not apply inaccessiblememonly to ::operator new() (#224316)

Do not apply `memory(inaccessiblemem: readwrite, errnomem: write)` to
`::operator new()` style calls (as opposed to `new T`). This matches the
cases where we mark the call as `builtin`, i.e. we only consider it
inaccessiblememonly in the cases where the allocation is also elidable.

I've left the old `noalias` handling alone, so that part keeps being
applied to `::operator new()` as before. Let me know if I should move
that to EmitNewDeleteCall() as well.



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