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

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 11 10:47:39 PDT 2025


================
@@ -228,7 +228,9 @@ void threadSafetyCleanup(BeforeSet *Cache);
 
 // FIXME: No way to easily map from TemplateTypeParmTypes to
 // TemplateTypeParmDecls, so we have this horrible PointerUnion.
-typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType *, NamedDecl *>,
+typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType *, NamedDecl *,
+                                     const TemplateSpecializationType *,
+                                     const SubstBuiltinTemplatePackType *>,
----------------
ilya-biryukov wrote:

When we hit this limit, we could either use a less optimized representation or figure out some clever trick to change it. I can see various options to refactor this, but I would like to discuss this separately and focus on other aspects of this PR in this review. 

Would that work for you? Do I need to leave a TODO: behind or open a separate github issue to track this?

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


More information about the cfe-commits mailing list