[libcxx-commits] [clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

Corentin Jabot via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 10 05:11:43 PDT 2025


================
@@ -4556,7 +4566,7 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E,
         NoteLValueLocation(Info, LVal.Base);
         return CompleteObject();
       }
-    } else {
+    } else if (AK != clang::AK_Dereference) {
----------------
cor3ntin wrote:

Correct, in the dereference case, the object needs to be valid

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


More information about the libcxx-commits mailing list