[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 10 12:45:00 PDT 2024
================
@@ -0,0 +1,57 @@
+// RUN: %clang_cc1 %s -verify
----------------
zygoloid wrote:
I'd like to also see some testing of the case where the template arguments have different sugar but are canonically the same, and when they differ by only cv-qualifiers. Those seem like likely cases for us to get wrong. Eg:
```c++
using T = int;
using CT = const T;
static_assert(__is_same(__type_list_dedup<TypeList, T, int, const int, const T, CT, const CT>,
TypeList<int, const int>));
```
https://github.com/llvm/llvm-project/pull/106730
More information about the cfe-commits
mailing list