[clang] [clang] Fix attempt to eval value dependent in perform (PR #229940)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 8 05:04:45 PDT 2026
================
@@ -8581,6 +8581,7 @@ ExprResult InitializationSequence::Perform(Sema &S,
// respectively.
Expr::EvalResult ER;
if (Entity.getType()->getAs<PointerType>() &&
+ !CurInit.get()->isValueDependent() &&
----------------
AaronBallman wrote:
[From @Fznamznon](https://github.com/llvm/llvm-project/pull/228776#discussion_r4211072160):
> Dependent might also mean error-dependent, https://clang.llvm.org/doxygen/classclang_1_1Expr.html#a3d637bce7879f620fab6be5d39e9035f says "an error, whose resolution is unknown". However I do agree that it looks confusing in C handling. I would rather just check that initializer is a valid expression before further checks.
https://github.com/llvm/llvm-project/pull/229940
More information about the cfe-commits
mailing list