[all-commits] [llvm/llvm-project] 729480: [CIR] Generalize cxx alloc new size handling (#187...
Andy Kaylor via All-commits
all-commits at lists.llvm.org
Mon Mar 23 11:47:40 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 729480c4aec6ea8a18149fd3c73de57aaa677d2a
https://github.com/llvm/llvm-project/commit/729480c4aec6ea8a18149fd3c73de57aaa677d2a
Author: Andy Kaylor <akaylor at nvidia.com>
Date: 2026-03-23 (Mon, 23 Mar 2026)
Changed paths:
M clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.cpp
M clang/lib/CIR/CodeGen/CIRGenFunction.h
A clang/test/CIR/CodeGen/cleanup-scope-return-in-loop.cpp
A clang/test/CIR/CodeGen/new-array-size-conv.cpp
Log Message:
-----------
[CIR] Generalize cxx alloc new size handling (#187790)
The non-constant size handling in `emitCXXNewAllocSize` was making the
incorrect assumption that the default behavior of the size value being
explicitly cast to size_t would be the only behavior we'd see. This is
actually only true with C++14 and later. To properly handle earlier
standards, we need the more robust checking that classic codegen does in
the equivalent function. This change adds that handling.
Assisted-by: Cursor / claude-4.6-opus-high
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