================
@@ -20707,6 +20739,8 @@ bool Expr::EvaluateAsInitializer(APValue &Value, const 
ASTContext &Ctx,
                     : EvaluationMode::ConstantFold);
   Info.setEvaluatingDecl(VD, Value);
   Info.InConstantContext = IsConstantInitialization;
+  Info.TryConstantInitialization =
+      !VD->isConstexpr() && !VD->hasAttr<ConstInitAttr>();
----------------
cor3ntin wrote:

It's the other way around - when trying to initialize a constant-initialized  
non-constexpr variable we do **not** want to force an instantiation (it may not 
yet be available or a more specialized definition may be provided later)

https://github.com/llvm/llvm-project/pull/173537
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to