[all-commits] [llvm/llvm-project] 7a9fd4: [win][clang] Fix devirtualization of vector deleti...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Thu Mar 12 16:26:39 PDT 2026


  Branch: refs/heads/release/22.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a9fd4a550e51b479c96aed4227cb7168c94bd53
      https://github.com/llvm/llvm-project/commit/7a9fd4a550e51b479c96aed4227cb7168c94bd53
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2026-03-12 (Thu, 12 Mar 2026)

  Changed paths:
    M clang/lib/CodeGen/CGExprCXX.cpp
    A clang/test/CodeGenCXX/ms-vdtors-devirtualization.cpp

  Log Message:
  -----------
  [win][clang] Fix devirtualization of vector deleting destructor call (#183741)

Since vector deleting destructor performs a loop over array elements and
calls delete[], simply devirtualizing call to it produces wrong code
with memory leaks.
Before emitting virtual call to vector deleting destructor, check if it
can be devirtualized, if yes, emit normal loop over array elements
instead of a virtual call.

No release note since this is a relatively recent regression.
This aims to fix https://github.com/llvm/llvm-project/issues/183621



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