https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90961
>From 5b70158f8eff30125c0bf0d675bab62497ac620f Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 3 May 2024 13:54:06 +0200
Subject: [PATCH 1/2] [clang] CTAD alias: refine the transformation for the
require-cla
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
hokein wrote:
Renamed to `getTemplateParameterDepth` per your suggestion.
https://gith
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
+ if (auto *TTP = dyn_cast(TemplateParam))
+return TTP->getDepth();
+ if (auto *TTP = dyn_cast(Temp
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
hokein wrote:
Done.
https://github.com/llvm/llvm-project/pull/90961
__
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
hokein wrote:
Yeah, we're in an anonymous namespace.
https://github.com/llvm/llvm-proj
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
+ if (auto *TTP = dyn_cast(TemplateParam))
+return TTP->getDepth();
+ if (auto *TTP = dyn_cast(Temp
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
+ if (auto *TTP = dyn_cast(TemplateParam))
+return TTP->getDepth();
+ if (auto *TTP = dyn_cast(Temp
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/90961
In the clang AST, constraint nodes are deliberately not instantiated unless
they are actively being evaluated. Consequently, occurrences of template
parameters in the require-clause expression have a subtle "dept
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Haojian Wu (hokein)
Changes
In the clang AST, constraint nodes are deliberately not instantiated unless
they are actively being evaluated. Consequently, occurrences of template
parameters in the require-clause expression have a subtle "de
https://github.com/erichkeane approved this pull request.
I think this makes sense, 2 nits, else LGTM.
https://github.com/llvm/llvm-project/pull/90961
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
+ if (auto *TTP = dyn_cast(TemplateParam))
+return TTP->getDepth();
+ if (auto *TTP = dyn_cast(Temp
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
erichkeane wrote:
are we in an anonymous namespace? Else this should be 'static'.
htt
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/90961
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
mizvekov wrote:
I think this is potentially misleading, as we already have multiple unr
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
+ if (auto *TTP = dyn_cast(TemplateParam))
+return TTP->getDepth();
+ if (auto *TTP = dyn_cast(Temp
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
mizvekov wrote:
```suggestion
unsigned getTemplateParameterDepth(NamedDecl *TemplatePar
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
+ if (auto *TTP = dyn_cast(TemplateParam))
+return TTP->getDepth();
+ if (auto *TTP = dyn_cast(Temp
@@ -2744,31 +2744,155 @@ bool hasDeclaredDeductionGuides(DeclarationName Name,
DeclContext *DC) {
return false;
}
+unsigned getTemplateDepth(NamedDecl *TemplateParam) {
+ if (auto *TTP = dyn_cast(TemplateParam))
+return TTP->getDepth();
+ if (auto *TTP = dyn_cast(Temp
18 matches
Mail list logo