[clang] [Clang] Treat constexpr-unknown value as invalid in `evaluateValue` (PR #128409)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 24 13:39:21 PST 2025
================
@@ -2587,6 +2587,9 @@ APValue *VarDecl::evaluateValueImpl(SmallVectorImpl<PartialDiagnosticAt> &Notes,
!Notes.empty())
Result = false;
+ if (Eval->Evaluated.allowConstexprUnknown())
+ Result = false;
----------------
efriedma-quic wrote:
I think this check should be inside `EvaluateAsInitializer()`... and all the other `Evaluate` entry points also include this check.
https://github.com/llvm/llvm-project/pull/128409
More information about the cfe-commits
mailing list