[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
================
@@ -4393,17 +4393,47 @@ void SubstTemplateTypeParmType::Profile(llvm::FoldingSetNodeID &ID,
ID.AddBoolean(Final);
}
+SubstPackType::SubstPackType(TypeClass Derived, QualType Canon,
+ const TemplateArgument &ArgPack)
+ : Type(Derived, Canon,
+ TypeDependence::DependentInstantiation |
+ TypeDependence::UnexpandedPack),
+ Arguments(ArgPack.pack_begin()) {
+#ifndef NDEBUG
+ for (const auto &P : ArgPack.pack_elements()) {
----------------
erichkeane wrote:
This looks like an:
```suggestion
assert(llvm::all_of(ArgPack, [](auto &P) { return P.getKind() == TemplateArgument::Type; }));
```
https://github.com/llvm/llvm-project/pull/106730
More information about the cfe-commits
mailing list