[clang] [clang] Fix attempt to eval value dependent in perform (PR #229940)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 8 05:17:30 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:

Yep, I still think that would be more obvious. Maybe no need to check narrowing (above) for invalid expressions too.
PR title and decription would probably benefit from a bit more concrete explanation of what is going and where, i.e. "do not crash on invalid c23 constexpr intitializer" 

https://github.com/llvm/llvm-project/pull/229940


More information about the cfe-commits mailing list