[clang] [clang-tools-extra] [llvm] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 13 06:09:09 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,
----------------
ilya-biryukov wrote:

> Unless we think that builtin templates were a mistake, and we instead would prefer to deprecate and eventually remove our support for builtin templates?

I certainly feel they are a useful tool to have and we should probably keep them.
I'm definitely very supportive of reducing the boilerplate.

On that front, @philnik777 do you feel like you digging out that local patch or should I take a stab at it?
In any case, I'd do this in a separate change. The boilerplate present in this commit is still very much manageable (and already done), so I don't think that blocking this PR on removing this boileerplate would be my first choice. 

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


More information about the cfe-commits mailing list