[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 28 14:05:31 PDT 2025
================
@@ -3629,17 +3644,17 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E,
Result = VD->getEvaluatedValue();
- // C++23 [expr.const]p8
- // ... For such an object that is not usable in constant expressions, the
- // dynamic type of the object is constexpr-unknown. For such a reference that
- // is not usable in constant expressions, the reference is treated as binding
- // to an unspecified object of the referenced type whose lifetime and that of
- // all subobjects includes the entire constant evaluation and whose dynamic
- // type is constexpr-unknown.
----------------
shafik wrote:
Please move this up to `CheckUninitReference`
https://github.com/llvm/llvm-project/pull/132990
More information about the cfe-commits
mailing list