================
@@ -1598,6 +1599,18 @@ BuiltinTemplateDecl::BuiltinTemplateDecl(const
ASTContext &C, DeclContext *DC,
createBuiltinTemplateParameterList(C, DC, BTK)),
BTK(BTK) {}
+bool BuiltinTemplateDecl::isPackProducingBuiltinTemplate() const {
+ return getBuiltinTemplateKind() == clang::BTK__builtin_dedup_pack;
+}
+
+bool clang::isPackProducingBuiltinTemplateName(TemplateName N) {
+ if (N.getKind() == TemplateName::DeducedTemplate)
+ return false;
+ auto *T = dyn_cast_or_null<BuiltinTemplateDecl>(
+ N.getTemplateDeclAndDefaultArgs().first);
+ return T && T->isPackProducingBuiltinTemplate();
----------------
ilya-biryukov wrote:
We do not allow the deduction to happen. I believe I added this check a long
time ago when `getTemplateDecl` was crashing if called for
`TemplateName::DeducedTemplate`.
I will try to remove this, it seems it's not necessary anymore.
https://github.com/llvm/llvm-project/pull/106730
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits