[all-commits] [llvm/llvm-project] 6e16b1: [CIR] Correct array-new 'asserts' (#228461)
Erich Keane via All-commits
all-commits at lists.llvm.org
Fri Oct 2 12:38:26 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6e16b1419271ba61fabde1cce577aa4d12d62cf4
https://github.com/llvm/llvm-project/commit/6e16b1419271ba61fabde1cce577aa4d12d62cf4
Author: Erich Keane <ekeane at nvidia.com>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
M clang/test/CIR/CodeGen/new.cpp
Log Message:
-----------
[CIR] Correct array-new 'asserts' (#228461)
The assertion checked whether the value was signed (which just checks
the MSB), but didn't check if the expression itself was of signed
type. The result was a size_t expression in the upper half (that is,
MSB set!) would hit the assertion. This patch checks the sign of
the thing too, which still allows us to do the zext later.
Additionally, this test case ALSO overflows, so we make sure we handle
overflow correctly here as well.
Fixes: #227980
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