[all-commits] [llvm/llvm-project] d6942d: [MS][clang] Add support for vector deleting destru...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Tue Mar 4 00:18:12 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d6942d54f677000cf713d2b0eba57b641452beb4
      https://github.com/llvm/llvm-project/commit/d6942d54f677000cf713d2b0eba57b641452beb4
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2025-03-04 (Tue, 04 Mar 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/VTableBuilder.h
    M clang/include/clang/Basic/ABI.h
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/MicrosoftMangle.cpp
    M clang/lib/AST/VTableBuilder.cpp
    M clang/lib/CodeGen/CGCXX.cpp
    M clang/lib/CodeGen/CGCXXABI.cpp
    M clang/lib/CodeGen/CGCXXABI.h
    M clang/lib/CodeGen/CGClass.cpp
    M clang/lib/CodeGen/CGDebugInfo.cpp
    M clang/lib/CodeGen/CGExprCXX.cpp
    M clang/lib/CodeGen/CGVTables.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/CodeGen/MicrosoftCXXABI.cpp
    M clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
    M clang/test/CodeGenCXX/dllexport.cpp
    M clang/test/CodeGenCXX/microsoft-abi-extern-template.cpp
    M clang/test/CodeGenCXX/microsoft-abi-structors.cpp
    M clang/test/CodeGenCXX/microsoft-abi-thunks.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vftables.cpp
    M clang/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-vdtors.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp
    M clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
    M clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp
    A clang/test/CodeGenCXX/microsoft-vector-deleting-dtors.cpp
    M clang/test/CodeGenCXX/vtable-consteval.cpp
    M clang/test/Modules/vtable-windows.cppm
    M clang/test/Profile/cxx-abc-deleting-dtor.cpp

  Log Message:
  -----------
  [MS][clang] Add support for vector deleting destructors (#126240)

Whereas it is UB in terms of the standard to delete an array of objects
via pointer whose static type doesn't match its dynamic type, MSVC
supports an extension allowing to do it.
Aside from array deletion not working correctly in the mentioned case,
currently not having this extension implemented causes clang to generate
code that is not compatible with the code generated by MSVC, because
clang always puts scalar deleting destructor to the vftable. This PR
aims to resolve these problems.

Fixes https://github.com/llvm/llvm-project/issues/19772



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