[clang] [clang-tools-extra] [Clang] Add a builtin that deduplicate types into a pack (PR #106730)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 6 08:19:56 PDT 2025


================
@@ -3924,6 +3925,14 @@ void CXXNameMangler::mangleType(const SubstTemplateTypeParmPackType *T) {
   Out << "_SUBSTPACK_";
 }
 
+void CXXNameMangler::mangleType(const SubstBuiltinTemplatePackType *T) {
+  // FIXME: not clear how to mangle this!
+  // template <class T...> class A {
+  //   template <class U...> void foo(__builtin_dedup_pack<T...>(*)(U) x...);
+  // };
+  Out << "_SUBSTPACK_";
----------------
erichkeane wrote:

Well, this should be a different name than above, but I think we can just choose whatever we want.   So be slightly more clever :) 

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


More information about the cfe-commits mailing list