[clang] [Clang] Avoid quadratic pack-indexing instantiation (store only the selected element) (PR #213790)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 02:28:11 PDT 2026
================
@@ -17,8 +17,7 @@ V...[I] bar() {return {};}
template <int I, typename... T>
using First = T...[0];
-// CHECK-LABEL: define {{.*}} @_ZN8GH1120033bazILi0EJiEEEvDy_SUBSTPACK_Li0E
-// FIXME: handle indexing of partially substituted packs
+// CHECK-LABEL: define {{.*}} @_ZN8GH1120033bazILi0EJiEEEvi
template <int I, typename...V>
void baz(First<I, int, V...>){};
----------------
cor3ntin wrote:
I do not think this is actually fixed. If I is dependent, we still have a partially substituted pack
https://github.com/llvm/llvm-project/pull/213790
More information about the cfe-commits
mailing list