[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 11:06:29 PDT 2025
================
@@ -6654,6 +6658,56 @@ class SubstTemplateTypeParmType final
}
};
+/// Represents the result of substituting a set of types as a template argument
+/// that needs to be expanded later.
+///
+/// These types are always dependent and produced depending on the situations:
+/// - SubstTemplateTypeParmPack is an expansion that had to be delayed,
+/// - SubstBuiltinTemplatePackType is an expansion from a builtin.
+class SubstPackType : public Type, public llvm::FoldingSetNode {
+ friend class ASTContext;
+
+ /// A pointer to the set of template arguments that this
+ /// parameter pack is instantiated with.
+ const TemplateArgument *Arguments;
----------------
ilya-biryukov wrote:
Right, the contract is the same as `SubstTemplateTypeParmPackType` here.
It might be worth improving for both, I just tried to avoid scope creep in this review, though.
https://github.com/llvm/llvm-project/pull/106730
More information about the cfe-commits
mailing list