[clang] [CodeGen] Fix new-delete-type-mismatch in ~CodeGenTypes() (PR #135787)

Antonio Maiorano via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 15 13:45:10 PDT 2025


amaiorano wrote:

> Please also make the unused "operator delete" in CGFunctionInfo.h deleted, since it shouldn't have any callers.
> 
> I think this never actually led to a real issue because of that operator delete... it calls the right deallocation function even if it's technically undefined. So the only way to spot an issue would be a sanitizer that specifically checks for this. But I'm happy to "fix" this anyway.

Just to clarify, this was caught in an ASAN build of DXC, which is a fork of Clang. This may be reproducible with Clang by compiling with `-fsized-deallocation`.

https://github.com/llvm/llvm-project/pull/135787


More information about the cfe-commits mailing list