[clang] [CodeGen] Fix handling of nullptr in initializers (PR #137364)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 25 11:23:59 PDT 2025


================
@@ -121,6 +121,7 @@ CAST_OPERATION(FunctionToPointerDecay)
 /// CK_NullToPointer - Null pointer constant to pointer, ObjC
 /// pointer, or block pointer.
 ///   (void*) 0
+///   (void*) nullptr
----------------
efriedma-quic wrote:

(Copy-pasting comment since I accidentally put it on the commit, instead of on the review.)

That's not helpful?  The issue isn't that the operand is a nullptr constant; the issue is that the result is a nullptr constant.  Something like `(std::nullptr_t)x`.

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


More information about the cfe-commits mailing list