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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 11 14:50:41 PDT 2025


================
@@ -4503,7 +4505,7 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E,
   } else {
     const Expr *Base = LVal.Base.dyn_cast<const Expr*>();
 
-    if (!Frame) {
+    if (!Frame && AK != clang::AK_CheckReferenceInitialization) {
----------------
efriedma-quic wrote:

This check looks a little weird... what's it doing?

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


More information about the cfe-commits mailing list