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

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 28 06:20:28 PST 2025


ilya-biryukov wrote:

@cor3ntin and everyone else, would you mind taking another look?

I wanted to bring this up again and tried to do all the proposed changes:
- we now have a builtin to sort types by mangled name.
- the builtins now expand directly into a list of template arguments.
- the builtins are now named `__builtin_dedup_types` and `__builtin_sort_types` as it's grown on me that `type_pack` is actually not the best name (even if we have some existing ones called like this).

I was worried that the latter would be too complicated, but it actually wasn't.
I had to make sure that it's only used in template arguments, but that was fairly easy (I hope I did not miss any important cases).

I would appreciate if folks took another look here and provided their feedback.
If this is going in the right direction, I'll write up the release notes and do any final changes that are necessary.

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


More information about the cfe-commits mailing list