[clang] [clang] Fix failed assertion crash when initializing compound literal pointer at file scope with error value (PR #229940)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 8 08:01:55 PDT 2026
================
@@ -8581,6 +8581,7 @@ ExprResult InitializationSequence::Perform(Sema &S,
// respectively.
Expr::EvalResult ER;
if (Entity.getType()->getAs<PointerType>() &&
+ !CurInit.get()->isValueDependent() &&
----------------
Fznamznon wrote:
I'm still not a fan of using anything that says "dependent" around C. I would just skip `CheckC23ConstexprInitConversion` entirely if the init expression is invalid.
https://github.com/llvm/llvm-project/pull/229940
More information about the cfe-commits
mailing list