[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 15 11:30:37 PDT 2025
================
@@ -5242,7 +5281,10 @@ static bool EvaluateVarDecl(EvalInfo &Info, const VarDecl *VD) {
if (InitE->isValueDependent())
return false;
- if (!EvaluateInPlace(Val, Info, Result, InitE)) {
+ if (VD->getType()->isReferenceType() &&
----------------
shafik wrote:
Can we a comment explaining this `if`?
https://github.com/llvm/llvm-project/pull/143667
More information about the cfe-commits
mailing list