[clang] [clang][Sema] Fix rejection of non-dependent void{} during template instantiation (PR #228340)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 2 01:30:19 PDT 2026
================
@@ -1646,8 +1646,8 @@ Sema::BuildCXXTypeConstructExpr(TypeSourceInfo *TInfo,
cast<InitListExpr>(Exprs[0])->getNumInits() == 0) {
return CXXFunctionalCastExpr::Create(
Context, Ty.getUnqualifiedType(), VK_PRValue, TInfo, CK_ToVoid,
- Exprs[0], /*Path=*/nullptr, CurFPFeatureOverrides(),
- Exprs[0]->getBeginLoc(), Exprs[0]->getEndLoc());
+ Exprs[0], /*Path=*/nullptr, CurFPFeatureOverrides(), SourceLocation(),
+ Exprs[0]->getEndLoc());
}
----------------
cor3ntin wrote:
I don't think this is correct - Did you investigate why we are not producing a CXXScalarValueInitExpr in both cases?
https://github.com/llvm/llvm-project/pull/228340
More information about the cfe-commits
mailing list