@@ -1122,6 +1122,154 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints(
PointOfInstantiation, Satisfaction);
}
+namespace {
+
+// We employ a TreeTransform because RAV couldn't recurse into a bunch of
+// Exprs e.g. SizeOfPackExpr,
@@ -1122,6 +1122,154 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints(
PointOfInstantiation, Satisfaction);
}
+namespace {
+
+// We employ a TreeTransform because RAV couldn't recurse into a bunch of
+// Exprs e.g. SizeOfPackExpr,
@@ -1122,6 +1122,154 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints(
PointOfInstantiation, Satisfaction);
}
+namespace {
+
+// We employ a TreeTransform because RAV couldn't recurse into a bunch of
+// Exprs e.g. SizeOfPackExpr,
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/102857
>From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 12 Aug 2024 23:32:34 +0800
Subject: [PATCH 01/10] [Clang][NFCI] Slightly refactor
getTemplateInstantiationAr
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/102857
>From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 12 Aug 2024 23:32:34 +0800
Subject: [PATCH 01/11] [Clang][NFCI] Slightly refactor
getTemplateInstantiationAr
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/102857
>From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 12 Aug 2024 23:32:34 +0800
Subject: [PATCH 01/12] [Clang][NFCI] Slightly refactor
getTemplateInstantiationAr
https://github.com/zyn0217 requested changes to this pull request.
It looks like T is assumed to be non-null for this function. Please do ensure
the reasonableness of the patch if it's made by a static analyzer
https://github.com/llvm/llvm-project/pull/104737
___
zyn0217 wrote:
@mordante
I saw some tests are "unexpectedly passed" on ARM platforms:
https://buildkite.com/llvm-project/libcxx-ci/builds/37165#0191685f-c770-41d1-a8a4-8819da1b1802
Is that something undesired / why did we mark them XFAIL previously?
https://github.com/llvm/llvm-project/pull/10
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/104911
(This is one step towards tweaking getTemplateInstantiationArgs() as discussed
in https://github.com/llvm/llvm-project/pull/102922)
We don't always substitute into default arguments while transforming a functio
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/104911
___
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/104911
___
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/104911
>From c8b8360fe046d38452f71479368c21e217468ddb Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 20 Aug 2024 17:18:35 +0800
Subject: [PATCH 1/2] [Clang][NFCI] Cleanup the fix for default function
substitut
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/104911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
// If this function was instantiated from a specialized member that is
// a function template, we're done.
assert(Function->getPrimaryTemplate() && "No function template?");
-
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/104911
>From c8b8360fe046d38452f71479368c21e217468ddb Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 20 Aug 2024 17:18:35 +0800
Subject: [PATCH 1/3] [Clang][NFCI] Cleanup the fix for default function
substitut
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
// If this function was instantiated from a specialized member that is
// a function template, we're done.
assert(Function->getPrimaryTemplate() && "No function template?");
-
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
// If this function was instantiated from a specialized member that is
// a function template, we're done.
assert(Function->getPrimaryTemplate() && "No function template?");
-
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
// If this function was instantiated from a specialized member that is
// a function template, we're done.
assert(Function->getPrimaryTemplate() && "No function template?");
-
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/104911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
// If this function was instantiated from a specialized member that is
// a function template, we're done.
assert(Function->getPrimaryTemplate() && "No function template?");
-
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/104911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
@mizvekov suggested in
https://github.com/llvm/llvm-project/issues/101735#issuecomment-2273950029 we
should try to decouple the constraint checking from the redeclaration chain
building, however that is somehow involved.
https://github.com/llvm/llvm-project/pull/102131
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/105195
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,252 @@
+#ifndef LLVM_CLANG_AST_DYNAMIC_RECURSIVE_AST_VISITOR_H
zyn0217 wrote:
Don't forget the license header :)
https://github.com/llvm/llvm-project/pull/105195
___
cfe-commits mailing list
cfe-commits@list
@@ -0,0 +1,252 @@
+#ifndef LLVM_CLANG_AST_DYNAMIC_RECURSIVE_AST_VISITOR_H
+#define LLVM_CLANG_AST_DYNAMIC_RECURSIVE_AST_VISITOR_H
+
+#include "clang/AST/Attr.h"
+#include "clang/AST/ExprConcepts.h"
+#include "clang/AST/TypeLoc.h"
+
+namespace clang {
+class ASTContext;
+
+/// Recu
https://github.com/zyn0217 commented:
Thanks!
https://github.com/llvm/llvm-project/pull/105195
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/105617
Follow-up on 8ac140f39.
The test `SemaTemplate/default-parm-init.cpp` was introduced since the fix for
#80288 and mainly did the following things:
- Ensure the default arguments are properly substituted inside
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/105617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
libcxx failures are unrelated.
https://github.com/llvm/llvm-project/pull/105617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/104866
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5399,11 +5434,85 @@ static QualType
GetImplicitObjectParameterType(ASTContext &Context,
return Context.getLValueReferenceType(RawType);
}
+static TemplateDeductionResult FinishTemplateArgumentDeduction(
+Sema &S, FunctionTemplateDecl *FTD, int ArgIdx, QualType P, Qu
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/102131
>From aa99ac433c9d383bfca732c19e5082a555f64c2d Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 6 Aug 2024 20:08:43 +0800
Subject: [PATCH] [Clang][Concepts] Fix the constraint equivalence checking for
Tem
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/102131
___
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/102131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/102131
___
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/105617
>From b837b99272353cb792a9ef19f1f68fd0b4bf8514 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 22 Aug 2024 13:08:12 +0800
Subject: [PATCH] [Clang][NFC] Consolidate tests for default argument
substitution
@@ -972,8 +972,15 @@ static const Expr
*SubstituteConstraintExpressionWithoutSatisfaction(
// equivalence.
LocalInstantiationScope ScopeForParameters(S);
if (auto *FD = DeclInfo.getDecl()->getAsFunction())
-for (auto *PVD : FD->parameters())
- ScopeForParameters
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/102131
>From aa99ac433c9d383bfca732c19e5082a555f64c2d Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 6 Aug 2024 20:08:43 +0800
Subject: [PATCH 1/2] [Clang][Concepts] Fix the constraint equivalence checking
for
@@ -91,15 +91,60 @@ void bar() {
namespace GH82104 {
-template int Zero = 0;
+template int Value = sizeof...(D);
-template
-using T14 = decltype([]() { return Zero; }());
+template
+using T14 = decltype([](auto Param) {
+ return Value + V + (int)sizeof(Param);
+}("hell
zyn0217 wrote:
> We are missing a changelog entry though
No release entry because this was intended to be a fix for 19 regression and we
now want to backport it :)
https://github.com/llvm/llvm-project/pull/89934
___
cfe-commits mailing list
cfe-commi
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager
&SourceMgr,
return false;
}
+static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) {
zyn0217 wrote:
Can you reference some wording here?
Are those hardcoded names
@@ -972,8 +972,30 @@ static const Expr
*SubstituteConstraintExpressionWithoutSatisfaction(
// equivalence.
LocalInstantiationScope ScopeForParameters(S);
if (auto *FD = DeclInfo.getDecl()->getAsFunction())
-for (auto *PVD : FD->parameters())
- ScopeForParameters
zyn0217 wrote:
> should we rename SubstituteConstraintExpressionWithoutSatisfaction to make it
> clear it only works to compare them?
Good idea. How about `SubstituteConstraintExpressionForEquivalenceChecking`
then? We can rename it in the next PR.
https://github.com/llvm/llvm-project/pull/
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/102131
>From aa99ac433c9d383bfca732c19e5082a555f64c2d Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 6 Aug 2024 20:08:43 +0800
Subject: [PATCH 1/3] [Clang][Concepts] Fix the constraint equivalence checking
for
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/102131
>From aa99ac433c9d383bfca732c19e5082a555f64c2d Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 6 Aug 2024 20:08:43 +0800
Subject: [PATCH 1/4] [Clang][Concepts] Fix the constraint equivalence checking
for
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/102131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
/cherry-pick e6974daa7
https://github.com/llvm/llvm-project/pull/102131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 milestoned
https://github.com/llvm/llvm-project/pull/102131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
/cherry-pick e6974daa
https://github.com/llvm/llvm-project/pull/102131
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -972,8 +972,30 @@ static const Expr
*SubstituteConstraintExpressionWithoutSatisfaction(
// equivalence.
LocalInstantiationScope ScopeForParameters(S);
if (auto *FD = DeclInfo.getDecl()->getAsFunction())
-for (auto *PVD : FD->parameters())
- ScopeForParameters
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/106054
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 approved this pull request.
Thanks!
https://github.com/llvm/llvm-project/pull/106054
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -231,3 +231,30 @@ struct type_info {
namespace GH93650 {
auto func(auto... inputArgs) { return typeid(inputArgs...[0]); }
} // namespace GH93650
+
+
+namespace GH105900 {
+
+template
+struct types {
+template
+static constexpr __SIZE_TYPE__ get_index() { return id
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89934
>From 9eb7a15b385bff343969382c911d744ae954b7f0 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 24 Apr 2024 20:54:58 +0800
Subject: [PATCH 1/2] [Clang][Sema] Revisit the lambda within a type alias
template
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89934
>From 9eb7a15b385bff343969382c911d744ae954b7f0 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 24 Apr 2024 20:54:58 +0800
Subject: [PATCH 1/3] [Clang][Sema] Revisit the lambda within a type alias
template
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/89934
___
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/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/4] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/5] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/96686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 commented:
Thanks for the patch! I think the overall approach looks good, and with this
patch, I also need to remove the assumption in my
https://github.com/llvm/llvm-project/pull/96084 that there's always a template
decl associated with the deduction guide.
https:
@@ -3216,6 +3226,44 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
Guides.suppressDiagnostics();
for (auto *G : Guides) {
+if (auto *DG = dyn_cast(G)) {
+ // The deduction guide is a non-template function decl, we just clone it.
+ auto *FunctionType =
+
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/96686
___
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/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/6] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/7] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/8] [Clang] Add diagnostic notes for implcitly generated
deductio
zyn0217 wrote:
> +1 to get this added to 18.1.9 if there ever is one - especially if the
> Android NDK moves to it - the 27 betas fail for me too
Sorry, I was unaware we had a scheduled release of 18.1.8 last week.
@tstellar @cor3ntin do you think this is worth another 18.x release (presumably
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
+
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/96864
As discussed in
https://github.com/llvm/llvm-project/pull/96084#discussion_r1654629993, it
would be nice to present these trailing constraints on template parameters when
printing CTAD decls through a DeclPrint
@@ -1189,6 +1189,16 @@ void DeclPrinter::printTemplateParameters(const
TemplateParameterList *Params,
Out << '>';
if (!OmitTemplateKW)
Out << ' ';
+
+ if (const Expr *RequiresClause = Params->getRequiresClause()) {
zyn0217 wrote:
Yeah, you're right,
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96864
>From a5c33bd413d8150d1688240c6b5253b1760cafe1 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 27 Jun 2024 15:59:48 +0800
Subject: [PATCH 1/2] [Clang][AST] Let DeclPrinter print trailing requires
expressi
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/96864
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 commented:
Thanks for the patch.
While I think this makes sense, it still confuses me whether there was some
redundancy in the guard condition. Do we have any situation where `Pattern` is
non-null whereas `ParentFD` becomes null? I assume they are always paired, at
l
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/9] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -108,8 +108,11 @@ struct Foo {
Foo(T const (&)[N]);
};
+// FIXME: Prefer non-canonical template arguments in the deduction guide?
zyn0217 wrote:
Good to know that, remove the FIXME now.
https://github.com/llvm/llvm-project/pull/96084
___
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 01/10] [Clang] Add diagnostic notes for implcitly generated
deduct
zyn0217 wrote:
Looks like we have hit the assert in
`SemaTemplate/alias-template-with-lambdas.cpp`. I brought that dirty test, and
I'll take a look this weekend.
https://github.com/llvm/llvm-project/pull/96888
___
cfe-commits mailing list
cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 01/11] [Clang] Add diagnostic notes for implcitly generated
deduct
zyn0217 wrote:
Thank you folks for the review & suggestion. I plan to merge this PR next week
in case @AaronBallman or @cor3ntin has objections.
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/94740
>From 2f60e51f2017e4448047f64983b2f22cdb67e816 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Jun 2024 18:08:10 +0800
Subject: [PATCH 1/5] [Clang] Substitute for the type aliases inside of a CTAD
guide
@@ -2220,23 +2220,103 @@ namespace {
class ExtractTypeForDeductionGuide
: public TreeTransform {
llvm::SmallVectorImpl &MaterializedTypedefs;
+ ClassTemplateDecl *NestedPattern;
+ const MultiLevelTemplateArgumentList *OuterInstantiationArgs;
public:
typedef TreeTran
@@ -16,3 +16,73 @@ using T = A::B;
using Copy = decltype(copy);
using Copy = A::B;
+
+namespace GH94614 {
+
+template struct S {};
zyn0217 wrote:
Yeah, and I've even tried `#pragma clang __debug dump param,` which doesn't
work either...
I was expecting we
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/94740
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
So, here is the offending case:
```cpp
template
concept True = true;
template
using MeowMeow = decltype([](U...) {}.template operator()(U()...));
void foo() {
using T = MeowMeow;
}
```
In this example, the lambda does not have the `TypeAliasTemplateDecl` where it
is define
zyn0217 wrote:
Thinking more, I still maintain that the check for `ParentFD` is redundant.
So, suppose we need to find a case to compromise the previous logic. In that
case, we need to find a generic lambda whose `Pattern` is defined inside a
function (i.e. `Pattern` is non-null) while its `In
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/97166
The noexcept specifiers of dependent lambdas would be transformed and rebuilt,
where the map of instantiation should also contain captured variables in case
they are used from the noexcept specifier.
I also unc
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/108148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
zyn0217 wrote:
Can you move the test to a pre-existing file instead of adding a new one? e.g.
somewhere like clang/test/SemaTemplate/pack-deduction.cpp, since this patch is
affecting somet
https://github.com/zyn0217 approved this pull request.
LGTM apart from Aaron’s comments. Thanks for the patch!
https://github.com/llvm/llvm-project/pull/108142
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/108693
When rebuilding immediate invocations inside
`RemoveNestedImmediateInvocation()`, we employed a `TreeTransform` to exercise
the traversal. The transformation has a side effect that, for template
specialization
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/108693
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -std=c++2a -triple=x86_64-linux -fsyntax-only %s -verify
zyn0217 wrote:
You can add another C++20 mode run to
clang/test/SemaCXX/static-assert-cxx26.cpp, instead of adding a new file.
https://github.com/llvm/llvm-project/pull
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -std=c++2a -triple=x86_64-linux -fsyntax-only %s -verify
zyn0217 wrote:
I believe so, yes. See the example:
clang/test/SemaCXX/constant-expression-cxx2b.cpp
https://github.com/llvm/llvm-project/pull/108701
___
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -std=c++2a -triple=x86_64-linux -fsyntax-only %s -verify
zyn0217 wrote:
Also, you might want to wrap the case with a namespace referring to the issue
number.
Furthermore, I think the test should be triaged as a Parser one. Ca
zyn0217 wrote:
> Can we figure out which PR this regression came from and make sure the code
> change makes sense in light of that PR?
https://github.com/llvm/llvm-project/pull/102044. We have backported the
P2741R3 implementation to C++11.
https://github.com/llvm/llvm-project/pull/108701
__
https://github.com/zyn0217 commented:
So I took a stab at it.
In `ParseStaticAssertDeclaration()`, we parsed the message in unclosed
static_assert as a constant expression rather than an unevaluated string
literal per the logic on lines 1079-1089.
So this approach gives up building an express
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/108701
___
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/108701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
901 - 1000 of 1781 matches
Mail list logo