================ @@ -265,7 +265,7 @@ namespace const_modify { namespace null { constexpr int test(int *p) { - return *p = 123; // expected-note {{assignment to dereferenced null pointer}} + return *p = 123; // expected-note {{read of dereferenced null pointer}} ---------------- cor3ntin wrote:
> Is there a reason we can't say assignment to like we did before? Yes, because we diagnose earlier, and trying to postpone the diagnostic would be messy, if at all possible ```cpp *p = 123; // invalid *p // also invalid ``` I changed to "dereferencing a null pointer is not allowed in a constant expression" which works everywhere https://github.com/llvm/llvm-project/pull/143667 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits