[clang] [clang] Fix assertion failure on direct initialization of an alias with an unexpanded pack from a parenthesized braced-init-list (PR #236838)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 19:31:47 PDT 2026


================
@@ -162,6 +162,7 @@ template void HiddenPack<int, float>();
 template<typename ...Ts> void HiddenPackInvalid() {
   Int<Ts>(); // expected-error {{unexpanded}}
   Int<Ts>{}; // expected-error {{unexpanded}}
+  Int<Ts>({}); // expected-error {{unexpanded}} expected-error {{cannot initialize non-class type}}
----------------
zyn0217 wrote:

Why didn't we crash for `Int<Ts>()`?

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


More information about the cfe-commits mailing list