[clang] [clang][Sema] Fix rejection of non-dependent void{} during template instantiation (PR #228340)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 2 03:09:52 PDT 2026


https://github.com/ojhunt requested changes to this pull request.

I'm not super happy with this kind of construction being represented as a functional cast expression - it is not correct from the AST PoV, and I'm not sure it is correct semantically either.

However we do this for list initializers already, and I'm not sure of the complexity of actually introducing a new list initializer specific node. If that is too heavy weight, I'd rather we add a CXXFunctionalCastExpr::CreateListInitializer(...) function to use instead of using a null SourceLocation for the parens as a side channel.

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


More information about the cfe-commits mailing list