[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 9 14:16:08 PDT 2024
================
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int {
BTK__make_integer_seq,
/// This names the __type_pack_element BuiltinTemplateDecl.
- BTK__type_pack_element
+ BTK__type_pack_element,
+
+ /// This names the __type_list_dedup BuiltinTemplateDecl.
+ BTK__type_list_dedup,
----------------
usx95 wrote:
What do you think about implementing this as a TypeTrait? This could be part of clang/Basic/TransformTypeTraits.def. Looking at the other transform type traits, their implementation looks much less complex and needs to touch much fewer files if we want to add more traits.
(That currently uses `"Unary"TransformType`. If this does not fit our purpose, we could introduce a variadic version of `VariadicTransformType`. This would be particularly helpful for future when we want to add more of such useful type_traits, we would be sharing a lot of code and would introducing such traits much less complex.)
https://github.com/llvm/llvm-project/pull/106730
More information about the cfe-commits
mailing list