[all-commits] [llvm/llvm-project] b686fb: [clang][Sema] Don't warn about non-virtual destruc...

Aditya Medhane via All-commits all-commits at lists.llvm.org
Thu Sep 10 11:45:22 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b686fb567fa4baeb810b0ae184811415daae68a1
      https://github.com/llvm/llvm-project/commit/b686fb567fa4baeb810b0ae184811415daae68a1
  Author: Aditya Medhane <sherlockedaditya at gmail.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.md
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/test/SemaCXX/delete-non-virtual-dtor.cpp

  Log Message:
  -----------
  [clang][Sema] Don't warn about non-virtual destructors on destroying delete (#222047)

A destroying `operator delete `takes over destruction, so the delete
expression never invokes the destructor and
[[expr.delete]p3](https://eel.is/c++draft/expr.delete#3) carves it out.
Skip `CheckVirtualDtorCall` when the selected deallocation function is
destroying. `::delete` and `delete[]` keep warning.

Fixes #65524



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