Endilll wrote:
Sure.
https://github.com/llvm/llvm-project/pull/94981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
After we fork for clang-20, we can entirely remove
`frelaxed-template-template-args`, and so won't need to worry about testing
that non-conforming mode. Would it be reasonable to postpone that until then?
Endilll wrote:
Now that you published P3310R0, this test can be moved to DR tests with a
status `// cwg2398: 19 drafting P3310R0`.
https://github.com/llvm/llvm-project/pull/94981
___
cfe-commits mailing list
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From b238961ba3a174d7dc211caf36ff8fd6c8429a76 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase {
/// \returns true if an error occurred, false otherwise.
bool CheckTemplateArgumentList(
TemplateDecl *Template, SourceLocation TemplateLoc,
- TemplateArgumentListInfo , bool PartialTemplateArgs,
+
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/94981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase {
/// \returns true if an error occurred, false otherwise.
bool CheckTemplateArgumentList(
TemplateDecl *Template, SourceLocation TemplateLoc,
- TemplateArgumentListInfo , bool PartialTemplateArgs,
+
https://github.com/Endilll commented:
`Sema.h` changes look good.
https://github.com/llvm/llvm-project/pull/94981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mizvekov wrote:
FYI https://github.com/itanium-cxx-abi/cxx-abi/issues/184 is the tracking issue
for the mangling rules we need here.
We will probably end up with something quite different than what I coded here
so far.
https://github.com/llvm/llvm-project/pull/94981
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase {
/// \returns true if an error occurred, false otherwise.
bool CheckTemplateArgumentList(
TemplateDecl *Template, SourceLocation TemplateLoc,
- TemplateArgumentListInfo , bool PartialTemplateArgs,
+
@@ -9434,6 +9505,32 @@ ASTContext::getSubstTemplateTemplateParmPack(const
TemplateArgument ,
return TemplateName(Subst);
}
+/// Retrieve the template name that represents a template name
+/// deduced from a specialization.
+TemplateName
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From f05e8590c7fae599d0658829949fa907942e83f2 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
@@ -9434,6 +9505,32 @@ ASTContext::getSubstTemplateTemplateParmPack(const
TemplateArgument ,
return TemplateName(Subst);
}
+/// Retrieve the template name that represents a template name
+/// deduced from a specialization.
+TemplateName
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
@@ -9434,6 +9505,32 @@ ASTContext::getSubstTemplateTemplateParmPack(const
TemplateArgument ,
return TemplateName(Subst);
}
+/// Retrieve the template name that represents a template name
+/// deduced from a specialization.
+TemplateName
@@ -172,6 +180,13 @@ class SubstTemplateTemplateParmPackStorage : public
UncommonTemplateNameStorage,
unsigned Index, bool Final);
};
+struct DefaultArguments {
+ unsigned StartPos;
cor3ntin wrote:
Can we add a comment here?
@@ -139,28 +165,61 @@ TemplateName::NameKind TemplateName::getKind() const {
return AssumedTemplate;
if (uncommon->getAsSubstTemplateTemplateParm())
return SubstTemplateTemplateParm;
+ if (uncommon->getAsDeducedTemplateName())
+return DeducedTemplate;
+
+
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase {
/// \returns true if an error occurred, false otherwise.
bool CheckTemplateArgumentList(
TemplateDecl *Template, SourceLocation TemplateLoc,
- TemplateArgumentListInfo , bool PartialTemplateArgs,
+
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
https://github.com/cor3ntin commented:
Thanks for this!
I still need time to fully understand the work this but i left a few comment in
the meantime.
Overall it seems like a good approach
https://github.com/llvm/llvm-project/pull/94981
___
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/94981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6371,6 +6376,70 @@ ASTContext::getCanonicalTemplateName(const TemplateName
) const {
canonArgPack, subst->getAssociatedDecl()->getCanonicalDecl(),
subst->getFinal(), subst->getIndex());
}
+ case TemplateName::DeducedTemplate: {
+assert(IgnoreDeduced
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From d12c7d50b67cd669f09b3701ccf34154876786c9 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From 68791782b7a1a0eafa98950f6e03aa1585be5223 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From ea98dec85a9817eb4e35ce97389433e4a5b9676d Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/94981
>From 015a05707caad5d39909bc68a5371161de464d9d Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 20 May 2024 01:15:03 -0300
Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class
llvmbot wrote:
@llvm/pr-subscribers-clang-modules
Author: Matheus Izvekov (mizvekov)
Changes
This extends default argument deduction to cover class templates as well, and
also applies outside of partial ordering, adding to the provisional wording
introduced in
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/94981
This extends default argument deduction to cover class templates as well, and
also applies outside of partial ordering, adding to the provisional wording
introduced in
33 matches
Mail list logo