zyn0217 wrote:
The commit message is mysteriously gone when merging with the github app 🥲
https://github.com/llvm/llvm-project/pull/132061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
@@ -1467,10 +1477,16 @@ namespace {
}
}
-static TemplateArgument
+bool HeuristicallyComputeSizeOfPackExpr() const {
+ return !TemplateArgs.isRewrite();
+}
+
+TemplateArgument
cor3ntin wrote:
static is gone
https://github.com/ll
@@ -1650,6 +1665,23 @@ namespace {
return inherited::TransformTemplateArgument(Input, Output, Uneval);
}
+std::optional ComputeSizeOfPackExprWithoutSubstitution(
+ArrayRef PackArgs) {
+ // Don't do this when rewriting template parameters for CTAD:
+
@@ -1467,10 +1477,16 @@ namespace {
}
}
-static TemplateArgument
+bool HeuristicallyComputeSizeOfPackExpr() const {
+ return !TemplateArgs.isRewrite();
+}
+
+TemplateArgument
zyn0217 wrote:
It is intended because we need to acce
@@ -1077,7 +1077,11 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
// !!NOTE: DeduceResults respects the sequence of template parameters of
// the deduction guide f.
for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
-if (const auto &D = DeduceResult
@@ -1650,6 +1665,23 @@ namespace {
return inherited::TransformTemplateArgument(Input, Output, Uneval);
}
+std::optional ComputeSizeOfPackExprWithoutSubstitution(
+ArrayRef PackArgs) {
+ // Don't do this when rewriting template parameters for CTAD:
+
@@ -1650,6 +1665,23 @@ namespace {
return inherited::TransformTemplateArgument(Input, Output, Uneval);
}
+std::optional ComputeSizeOfPackExprWithoutSubstitution(
+ArrayRef PackArgs) {
+ // Don't do this when rewriting template parameters for CTAD:
+
@@ -1650,6 +1665,23 @@ namespace {
return inherited::TransformTemplateArgument(Input, Output, Uneval);
}
+std::optional ComputeSizeOfPackExprWithoutSubstitution(
+ArrayRef PackArgs) {
+ // Don't do this when rewriting template parameters for CTAD:
+
@@ -1072,12 +1072,27 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
AliasRhsTemplateArgs, TDeduceInfo, DeduceResults,
/*NumberOfArgumentsMustMatch=*/false);
+ static std::function IsNonDeducedArgument =
zyn0217 wrote:
Ah sorry I saw the commen
@@ -17,3 +16,134 @@ void k() {
}
} // namespace GH64347
+
+namespace GH123591 {
+
+
+template < typename... _Types >
+struct variant {
+ template
+ variant(_Types...);
+};
+
+template
+using AstNode = variant;
+
+AstNode tree(42, 43, 44);
+
+}
+
+namespace GH123591_2 {
+
+
@@ -17,3 +16,134 @@ void k() {
}
} // namespace GH64347
+
+namespace GH123591 {
+
+
+template < typename... _Types >
+struct variant {
+ template
+ variant(_Types...);
+};
+
+template
+using AstNode = variant;
+
+AstNode tree(42, 43, 44);
+
+}
+
+namespace GH123591_2 {
+
+
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running
on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/154/builds/13778
Here is the relevant piece o
zyn0217 wrote:
I'll merge without a release note, instead I plan to backport it to the 20
release along with a changelog.
https://github.com/llvm/llvm-project/pull/132061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/132061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1072,12 +1072,27 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
AliasRhsTemplateArgs, TDeduceInfo, DeduceResults,
/*NumberOfArgumentsMustMatch=*/false);
+ static std::function IsNonDeducedArgument =
cor3ntin wrote:
I meant a function in t
https://github.com/mizvekov approved this pull request.
LGTM, Thanks.
https://github.com/llvm/llvm-project/pull/132061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1072,12 +1072,25 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
AliasRhsTemplateArgs, TDeduceInfo, DeduceResults,
/*NumberOfArgumentsMustMatch=*/false);
+ static auto IsNonDeducedArgument = [&](const DeducedTemplateArgument &TA) {
+// The following case
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/132061
>From fb9fa67da10a7dbfb2db5520d2773085585f4c14 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 20 Mar 2025 00:54:54 +0800
Subject: [PATCH 1/5] [Clang] Fix various bugs in alias CTAD transform
---
clang/
@@ -1072,12 +1072,25 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
AliasRhsTemplateArgs, TDeduceInfo, DeduceResults,
/*NumberOfArgumentsMustMatch=*/false);
+ static auto IsNonDeducedArgument = [&](const DeducedTemplateArgument &TA) {
+// The following case
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/132061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/132061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/132061
>From fb9fa67da10a7dbfb2db5520d2773085585f4c14 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 20 Mar 2025 00:54:54 +0800
Subject: [PATCH 1/4] [Clang] Fix various bugs in alias CTAD transform
---
clang/
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/132061
>From fb9fa67da10a7dbfb2db5520d2773085585f4c14 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 20 Mar 2025 00:54:54 +0800
Subject: [PATCH 1/3] [Clang] Fix various bugs in alias CTAD transform
---
clang/
@@ -1077,7 +1077,11 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
// !!NOTE: DeduceResults respects the sequence of template parameters of
// the deduction guide f.
for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) {
-if (const auto &D = DeduceResult
@@ -3660,6 +3660,8 @@ class TreeTransform {
return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd());
}
+ bool HeuristicallyComputeSizeOfPackExpr() const { return true; }
+
zyn0217 wrote:
I choose to extract a function `ComputeSizeOfP
@@ -1348,6 +1348,16 @@ std::optional
Sema::isSFINAEContext() const {
return std::nullopt;
}
+static TemplateArgument
+getPackSubstitutedTemplateArgument(Sema &S, TemplateArgument Arg) {
zyn0217 wrote:
This is pre-existing - do I have to rename that?
https
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/132061
>From fb9fa67da10a7dbfb2db5520d2773085585f4c14 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 20 Mar 2025 00:54:54 +0800
Subject: [PATCH 1/2] [Clang] Fix various bugs in alias CTAD transform
---
clang/
@@ -1348,6 +1348,16 @@ std::optional
Sema::isSFINAEContext() const {
return std::nullopt;
}
+static TemplateArgument
+getPackSubstitutedTemplateArgument(Sema &S, TemplateArgument Arg) {
cor3ntin wrote:
`getSubstitutedTemplateArgumentPattern` would be a be
@@ -3660,6 +3660,8 @@ class TreeTransform {
return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd());
}
+ bool HeuristicallyComputeSizeOfPackExpr() const { return true; }
+
cor3ntin wrote:
This will need a comment
https://github.com/
@@ -3660,6 +3660,8 @@ class TreeTransform {
return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd());
}
+ bool HeuristicallyComputeSizeOfPackExpr() const { return true; }
+
cor3ntin wrote:
I think I would prefer to add a `TransformSiz
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Younan Zhang (zyn0217)
Changes
(I'll add more details to the description tomorrow)
Fixes #123591
Fixes #127539
Fixes #129077
Fixes #129998
---
Full diff: https://github.com/llvm/llvm-project/pull/132061.diff
4 Files Affected:
- (modifi
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/132061
(I'll add more details to the description tomorrow)
Fixes #123591
Fixes #127539
Fixes #129077
Fixes #129998
>From fb9fa67da10a7dbfb2db5520d2773085585f4c14 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu,
32 matches
Mail list logo