================
@@ -348,6 +348,12 @@ bool CheckConstant(InterpState &S, CodePtr OpPC, const 
Descriptor *Desc) {
   if (D->isConstexpr())
     return true;
 
+  if (const auto *VD = dyn_cast_if_present<VarDecl>(S.EvaluatingDecl);
----------------
tbaederr wrote:

Why are you checking `EvaluatingDecl` here and not `D`?

https://github.com/llvm/llvm-project/pull/112211
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to