[clang] [clang][Sema] fix crash on __type_pack_element with dependent packs (GH180307) (PR #180407)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 19:51:03 PST 2026
================
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// expected-error@* {{template argument for non-type template parameter must be an expression}}
+
+using SizeT = decltype(sizeof(int));
+
+// Dependent cases that previously crashed but now return QualType() gracefully.
+template <SizeT... Seq> // expected-note {{template parameter is declared here}}
+using gh180307 = __type_pack_element<Seq...>;
+
+template <typename T>
+using gh180307_bis = __make_integer_seq<gh180307, T>;
----------------
ojhunt wrote:
add a few tests for too many parameters as well
https://github.com/llvm/llvm-project/pull/180407
More information about the cfe-commits
mailing list