[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
Sun Oct 4 05:42:56 PDT 2026
================
@@ -973,6 +973,14 @@ CXXFunctionalCastExpr *CXXFunctionalCastExpr::CreateEmpty(const ASTContext &C,
CXXFunctionalCastExpr(EmptyShell(), PathSize, HasFPFeatures);
}
+CXXFunctionalCastExpr *CXXFunctionalCastExpr::CreateListInitializer(
+ const ASTContext &C, QualType T, ExprValueKind VK, TypeSourceInfo *Written,
+ CastKind K, Expr *Op, const CXXCastPath *BasePath, FPOptionsOverride FPO) {
+ // List-initialization is represented by null paren locations
+ return Create(C, T, VK, Written, K, Op, BasePath, FPO, SourceLocation(),
+ SourceLocation());
----------------
cor3ntin wrote:
Looking at the code, it's only the LParen that's null - the r parent is needed to get correct getEnd().
While you fix that can you add a fixme comment in `CXXFunctionalCastExpr::isListInitialization` (saying we should use a bit to represent that) ? Thanks
https://github.com/llvm/llvm-project/pull/228340
More information about the cfe-commits
mailing list