[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
================
@@ -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;
----------------
erichkeane wrote:
Who owns these arguments? Are they part of the containing declaration? How do we know which set are ours?
It IS a touch confusing we're using the type-bits instead of an arrayref here, but justified :( (Nothing to do with this sentence, just lamenting...).
https://github.com/llvm/llvm-project/pull/106730
More information about the cfe-commits
mailing list