ahatanak wrote: Note that the call to `hasInit` at the beginning of function `VarDecl::getInit` returns true even when the variable doesn't have an initializer if `VarDecl::ensureEvaluatedStmt` is called before that. https://github.com/llvm/llvm-project/pull/93749