[clang] [clang][ExprConst] Consider integer pointers of value 0 nullptr (PR #150164)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 23 10:00:16 PDT 2025
================
@@ -27,12 +27,6 @@ template void f<B{nullptr}>();
// CHECK: define weak_odr void @_Z1fIXtl1BLPKi32EEEEvv(
// MSABI: define {{.*}} @"??$f@$2UB@@PEBH0CA at H0A@@@@YAXXZ"
template void f<B{fold((int*)32)}>();
-#ifndef _WIN32
----------------
efriedma-quic wrote:
This specific test is fine, I think: if we know the value is in fact equivalent to a null pointer, there's no reason to treat it differently.
But I'd like to also see a test for a pointer where null is not zero.
https://github.com/llvm/llvm-project/pull/150164
More information about the cfe-commits
mailing list