https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/89807
>From 3f6e50edc7b4d4bf4781c71bd29f48224b62822d Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Tue, 9 Apr 2024 01:14:28 -0300
Subject: [PATCH] [clang] Enable C++17 relaxed template template argument
yxsamliu wrote:
> This patch will finally allow us to mark C++17 support in clang as complete.
>
> This is a continuation of the review process from an [old PR in
> phab](https://reviews.llvm.org/D109496).
>
> Recap: The original patch from phab initially contained no workarounds /
>
mizvekov wrote:
So Jason pointed out that GCC's provisional wording for CWG2398 picks a dubious
candidate for this example:
```C++
template struct match2;
template class t1,typename T>
struct match2, typename t1::type > { typedef int type; }; // #5
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
pinskia wrote:
Reference to https://github.com/llvm/llvm-project/issues/55894 .
https://github.com/llvm/llvm-project/pull/89807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1133,8 +1133,8 @@ C++17 implementation status
Matching template template parameters to compatible arguments
- https://wg21.link/p0522r0;>P0522R0
- Partial (10)
+ https://wg21.link/p0522r0;>P0522R0 (DR)
+ Clang 4 (10)
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -519,13 +571,45 @@ DeduceTemplateArguments(Sema , TemplateParameterList
*TemplateParams,
return TemplateDeductionResult::Success;
}
- if (TemplateTemplateParmDecl *TempParam
-= dyn_cast(ParamDecl)) {
+ if (auto *TempParam = dyn_cast(ParamDecl)) {
//
@@ -1133,8 +1133,8 @@ C++17 implementation status
Matching template template parameters to compatible arguments
- https://wg21.link/p0522r0;>P0522R0
- Partial (10)
+ https://wg21.link/p0522r0;>P0522R0 (DR)
+ Clang 4 (10)
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -519,13 +571,45 @@ DeduceTemplateArguments(Sema , TemplateParameterList
*TemplateParams,
return TemplateDeductionResult::Success;
}
- if (TemplateTemplateParmDecl *TempParam
-= dyn_cast(ParamDecl)) {
+ if (auto *TempParam = dyn_cast(ParamDecl)) {
//
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
+
@@ -1133,8 +1133,8 @@ C++17 implementation status
Matching template template parameters to compatible arguments
- https://wg21.link/p0522r0;>P0522R0
- Partial (10)
+ https://wg21.link/p0522r0;>P0522R0 (DR)
+ Clang 4 (10)
@@ -507,10 +507,62 @@ static TemplateDeductionResult
DeduceNonTypeTemplateArgument(
S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced);
}
+static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A,
cor3ntin wrote:
This
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/89807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin commented:
I'm pretty happy with the direction this is going in.
I'd like to see the specific test in
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2398, the ones we
exchanged by mails and some tests with constraints
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
https://github.com/mizvekov edited
https://github.com/llvm/llvm-project/pull/89807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
https://github.com/erichkeane commented:
Also needs a release note, entry into breaking changes, and a post on mailing
list or whatever for the 'breaking change' subscribers to pay attention to.
https://github.com/llvm/llvm-project/pull/89807
___
@@ -8343,58 +8343,52 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
// C++1z [temp.arg.template]p3: (DR 150)
// A template-argument matches a template template-parameter P when P
// is at least as specialized as the template-argument A.
@@ -6561,7 +6561,7 @@ void Clang::ConstructJob(Compilation , const JobAction
,
if (const Arg *A =
Args.getLastArg(options::OPT_fvisibility_global_new_delete_hidden)) {
D.Diag(diag::warn_drv_deprecated_arg)
-<< A->getAsString(Args)
+<<
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/89807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
We probably need to attach this to ClangABI as well, this is an ABI breaking
change.
https://github.com/llvm/llvm-project/pull/89807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Matheus Izvekov (mizvekov)
Changes
This patch will finally allow us to mark C++17 support in clang as complete.
This is a continuation of the review process from an [old PR in
phab](https://reviews.llvm.org/D109496).
Recap: The original
https://github.com/mizvekov created
https://github.com/llvm/llvm-project/pull/89807
This patch will finally allow us to mark C++17 support in clang as complete.
This is a continuation of the review process from an [old PR in
phab](https://reviews.llvm.org/D109496).
Recap: The original patch
38 matches
Mail list logo