[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Younan Zhang via cfe-commits
@@ -4342,10 +4342,17 @@ QualType Sema::CheckTemplateIdType(TemplateName Name, InstantiatingTemplate Inst(*this, TemplateLoc, Template); if (Inst.isInvalid()) return QualType(); +if (!AliasTemplate->getDeclContext()->isFileContext()) { + ContextRAII SavedC

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -std=c++14 -verify %s +// RUN: %clang_cc1 -std=c++17 -verify %s +// RUN: %clang_cc1 -std=c++20 -verify %s zyn0217 wrote: Do we really need so many runs? I wonder if only `-std=c++11` i

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Younan Zhang via cfe-commits
@@ -259,6 +259,10 @@ Bug Fixes in This Version operator. Fixes (#GH83267). +- Allow access to a public template alias declaration that refers to friend's zyn0217 wrote: I suspect this should have been placed under the group `Bug Fixes to C++ Support`...?

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-12 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > Was this sort of a behavior change expected? I don't think so; a reproducer would be really appreciated. https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-12 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > I'm reducing the test case. In the meantime, should this be reverted? I think this depends on the case. Note the issues addressed by this patch may not only cause some crashes in debug build, but probably lead to incorrect constraint evaluation in release build, which means th

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-03-12 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin WDYT? https://github.com/llvm/llvm-project/pull/83420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/82310 >From 25f493da55e5cd7d46dda6fca6062aa56b6a3fd0 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Feb 2024 14:54:14 +0800 Subject: [PATCH 1/7] The lambda call inside of a type alias --- clang/docs/Releas

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/82310 >From 25f493da55e5cd7d46dda6fca6062aa56b6a3fd0 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Feb 2024 14:54:14 +0800 Subject: [PATCH 1/7] The lambda call inside of a type alias --- clang/docs/Releas

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-12 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > I think some `static_assert` statements are required to demonstrate it does > deduce the type of template parameters correctly. Added. Although the patch doesn't touch that type deduction part and thus they are theoretically not affected. https://github.com/llvm/llvm-project

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/85032 Draft for CI. Addresses https://github.com/llvm/llvm-project/issues/82628 >From 6469dca42dae503bf08a65e55d60ccf48e012f25 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 13 Mar 2024 13:47:33 +0800 Subject:

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/85032 >From 6469dca42dae503bf08a65e55d60ccf48e012f25 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 13 Mar 2024 13:47:33 +0800 Subject: [PATCH 1/2] [concepts] Preserve the FoundDecl of ConceptReference properl

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/85032 >From 6469dca42dae503bf08a65e55d60ccf48e012f25 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 13 Mar 2024 13:47:33 +0800 Subject: [PATCH 1/4] [concepts] Preserve the FoundDecl of ConceptReference properl

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (Waiting for the CI before landing it. As usual, thank you all for the review!) https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang] reject to capture variable in `RequiresExprBodyDecl` (PR #78598)

2024-02-26 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Could you please explain why you're closing the PR? https://github.com/llvm/llvm-project/pull/78598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-02-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Friendly ping. I'm looking for your feedback before fixing other similar bugs, e.g. #82104. https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Concepts] Consider outer scope Decls for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/83420 This fixes the case shown by https://github.com/llvm/llvm-project/issues/64808#issuecomment-1929129271. Similar to https://github.com/llvm/llvm-project/commit/f9caa12328b265b77221fe7a310d4504673d814a, we have

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/83420 >From 072d2aa8b758d61e0459bd626fbea881c3e1596c Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 29 Feb 2024 19:47:01 +0800 Subject: [PATCH] [Concepts] Consider outer scope Decls for conversion function con

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/83420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
@@ -7976,7 +7976,8 @@ void Sema::AddConversionCandidate( if (Conversion->getTrailingRequiresClause()) { ConstraintSatisfaction Satisfaction; -if (CheckFunctionConstraints(Conversion, Satisfaction) || +if (CheckFunctionConstraints(Conversion, Satisfaction, /*Usage

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/83420 >From 19d97fcf8867554f06973ea6ccb36b47d286ec30 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 29 Feb 2024 23:14:46 +0800 Subject: [PATCH] Limit the scope to lambda conversion function only --- clang/doc

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-02-29 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @erichkeane : I've updated the patch to limit the scope to lambda-only, which is now more appropriate to me. PTAL, thanks! https://github.com/llvm/llvm-project/pull/83420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thank you for the quick fix! While I think the patch looks generally good to me, it would be better to add some analysis of the bug. That said, I took a closer look at it, and I think I probably have another similar approach that doesn't i

[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-03 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Great example, thanks! Now I understand the "two-level" case better. I don't have any other concerns about the refactor, so feel free to land it or wait for other folks' opinions. https://github.com/llvm/llvm-project/pull/83542 ___ cfe

[clang] [Clang] Fix looking for immediate calls in default arguments. (PR #80690)

2024-03-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Does this fix https://github.com/llvm/llvm-project/issues/67134 as well? https://github.com/llvm/llvm-project/pull/80690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] gh56556 (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/83997 CI >From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 5 Mar 2024 19:56:59 +0800 Subject: [PATCH] gh56556 --- clang/lib/Sema/TreeTransform.h | 6 -- 1 file

[libc] [libcxxabi] [lld] [clang-tools-extra] [llvm] [mlir] [flang] [lldb] [libunwind] [clang] [compiler-rt] [openmp] [libcxx] [clang] static operators should evaluate object argument (PR #68485)

2024-01-30 Thread Younan Zhang via cfe-commits
@@ -15097,15 +15102,9 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, ExprValueKind VK = Expr::getValueKindForType(ResultTy); ResultTy = ResultTy.getNonLValueExprType(Context); -CallExpr *TheCall; -if (Method->isInst

[llvm] [lldb] [lld] [libcxx] [clang-tools-extra] [libcxxabi] [libc] [clang] [libunwind] [openmp] [compiler-rt] [flang] [mlir] [clang] static operators should evaluate object argument (PR #68485)

2024-01-30 Thread Younan Zhang via cfe-commits
@@ -15097,15 +15102,9 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, ExprValueKind VK = Expr::getValueKindForType(ResultTy); ResultTy = ResultTy.getNonLValueExprType(Context); -CallExpr *TheCall; -if (Method->isInst

[libc] [libcxx] [lldb] [flang] [compiler-rt] [clang-tools-extra] [llvm] [lld] [clang] [concepts] Push a CurContext before substituting into out-of-line constraints for comparison (PR #79985)

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/79985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [lldb] [libunwind] [mlir] [libcxx] [llvm] [openmp] [libc] [compiler-rt] [flang] [clang-tools-extra] [libcxxabi] [clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-30 Thread Younan Zhang via cfe-commits
@@ -15097,15 +15102,9 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, ExprValueKind VK = Expr::getValueKindForType(ResultTy); ResultTy = ResultTy.getNonLValueExprType(Context); -CallExpr *TheCall; -if (Method->isInst

[flang] [clang-tools-extra] [compiler-rt] [lldb] [libunwind] [libcxx] [lld] [mlir] [clang] [libc] [openmp] [llvm] [libcxxabi] [clang] static operators should evaluate object argument (reland) (PR #801

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks again for working on it. The clangd part LGTM, and since the other part was left as-is and had been accepted in our previous attempt #68485, I believe we can now reland the patch. Please keep an eye on the CI in case we have missed

[openmp] [lld] [compiler-rt] [flang] [lldb] [libunwind] [libcxxabi] [llvm] [libcxx] [mlir] [clang-tools-extra] [clang] [libc] [clang] static operators should evaluate object argument (reland) (PR #801

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/80108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [lld] [compiler-rt] [flang] [lldb] [libunwind] [libcxxabi] [llvm] [libcxx] [mlir] [clang-tools-extra] [clang] [libc] [clang] static operators should evaluate object argument (reland) (PR #801

2024-01-30 Thread Younan Zhang via cfe-commits
@@ -651,16 +651,12 @@ class InlayHintVisitor : public RecursiveASTVisitor { // implied object argument ([over.call.func]), the list of provided // arguments is preceded by the implied object argument for the purposes of // this correspondence... -// -// How

[openmp] [lld] [compiler-rt] [flang] [lldb] [libunwind] [libcxxabi] [llvm] [libcxx] [mlir] [clang-tools-extra] [clang] [libc] [clang] static operators should evaluate object argument (reland) (PR #801

2024-01-30 Thread Younan Zhang via cfe-commits
@@ -651,16 +651,12 @@ class InlayHintVisitor : public RecursiveASTVisitor { // implied object argument ([over.call.func]), the list of provided // arguments is preceded by the implied object argument for the purposes of // this correspondence... -// -// How

[llvm] [libcxx] [lld] [libc] [compiler-rt] [lldb] [clang] [clang-tools-extra] [flang] [concepts] Push a CurContext before substituting into out-of-line constraints for comparison (PR #79985)

2024-01-31 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I plan to backport this patch and #79698 to clang 18 a few days later to see if we're actually not breaking anything. https://github.com/llvm/llvm-project/pull/79985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang][Sema] GH58548 (PR #80395)

2024-02-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/80395 Draft for triggering the libc++ CI. >From 24a8251aab9a1a03953412ae47508d039d926212 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 2 Feb 2024 15:24:13 +0800 Subject: [PATCH] [clang][Sema] Fix GH58548 ---

[clang] [clang][Sema] GH58548 (PR #80395)

2024-02-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/80395 >From 24a8251aab9a1a03953412ae47508d039d926212 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 2 Feb 2024 15:24:13 +0800 Subject: [PATCH 1/2] [clang][Sema] Fix GH58548 --- clang/docs/ReleaseNotes.rst

[clang] [clang][Sema] GH58548 (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate. (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libc] [clang-tools-extra] [clang] [llvm] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/80395 >From 24a8251aab9a1a03953412ae47508d039d926212 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 2 Feb 2024 15:24:13 +0800 Subject: [PATCH 1/2] [clang][Sema] Fix GH58548 --- clang/docs/ReleaseNotes.rst

[flang] [libc] [clang-tools-extra] [clang] [llvm] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [flang] [clang-tools-extra] [llvm] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [flang] [libc] [llvm] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [flang] [libc] [clang] [clang-tools-extra] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks for the quick review! I tested the original bug report without the patch but couldn't reproduce it. Nevertheless, the example produced by @royjacobson (which still crashes the trunk) was fixed by this patch. I'm not sure if this merits a backport? https://github.com/llvm

[llvm] [flang] [libc] [clang] [clang-tools-extra] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [flang] [llvm] [libc] [clang][Sema] Populate function template depth at AddTemplateOverloadCandidate (PR #80395)

2024-02-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/80395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (PR #80592)

2024-02-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Note that clang-pseudo is deprecated and will soon get [removed](https://github.com/llvm/llvm-project/pull/80081) from the repository. I have no idea about the replacement, and I'm not sure if it makes sense to evolve the feature with it. I invited some folks (who may be in ch

[clang] [concepts] Fixes for gh72557 (PR #80594)

2024-02-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/80594 Draft for CI. >From c04bb951d35e0f767ea9b0fed8e200b161d646e1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 4 Feb 2024 17:35:16 +0800 Subject: [PATCH] [concepts] Fixes for gh72557 --- clang/docs/Releas

[clang] [concepts] Fixes for gh72557 (PR #80594)

2024-02-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [concepts] Extract function template pack arguments from the current instantiation if possible (PR #80594)

2024-02-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [concepts] Extract function template pack arguments from the current instantiation if possible (PR #80594)

2024-02-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/80594 >From c04bb951d35e0f767ea9b0fed8e200b161d646e1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 4 Feb 2024 17:35:16 +0800 Subject: [PATCH 1/2] [concepts] Fixes for gh72557 --- clang/docs/ReleaseNotes.rst

[clang-tools-extra] [clang] [llvm] [concepts] Extract function template pack arguments from the current instantiation if possible (PR #80594)

2024-02-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/80594 >From c04bb951d35e0f767ea9b0fed8e200b161d646e1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 4 Feb 2024 17:35:16 +0800 Subject: [PATCH 1/2] [concepts] Fixes for gh72557 --- clang/docs/ReleaseNotes.rst

[clang-tools-extra] [clang] [llvm] [concepts] Extract function template pack arguments from the current instantiation if possible (PR #80594)

2024-02-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/80594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [concepts] Extract function template pack arguments from the current instantiation if possible (PR #80594)

2024-02-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/80594 >From c04bb951d35e0f767ea9b0fed8e200b161d646e1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 4 Feb 2024 17:35:16 +0800 Subject: [PATCH 1/3] [concepts] Fixes for gh72557 --- clang/docs/ReleaseNotes.rst

[clang] [Clang][Parser] GH78524 (PR #80656)

2024-02-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/80656 Poking the CI. >From 3ceeae611848b58f8d49c58295a625bdb052ac97 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 5 Feb 2024 18:01:34 +0800 Subject: [PATCH] GH78524 --- clang/lib/Parse/ParseExprCXX.cpp

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/80656 >From 48211eb7778db8fb8af144d59adb2e0941957c4c Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 5 Feb 2024 18:01:34 +0800 Subject: [PATCH] GH78524 --- clang/docs/ReleaseNotes.rst | 4 ++

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/80656 >From 48211eb7778db8fb8af144d59adb2e0941957c4c Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 5 Feb 2024 18:01:34 +0800 Subject: [PATCH 1/2] GH78524 --- clang/docs/ReleaseNotes.rst |

[clang-tools-extra] [llvm] [clang] [concepts] Extract function template pack arguments from the current instantiation if possible (PR #80594)

2024-02-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/80594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Try to fix GH73418 (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/79568 For the purpose of poking the libc++ CI. >From 212a4efbc65c437f652dc08c75ed4a836167fe70 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 26 Jan 2024 18:03:37 +0800 Subject: [PATCH] [clang][Sema] fixup ---

[clang] [WIP] Try to fix GH73418 (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79568 >From 386c17d55f68155b711672f87d803eb934372a70 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 26 Jan 2024 18:03:37 +0800 Subject: [PATCH] [Concepts] Traverse the instantiation chain for parameter injecti

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
zyn0217 wrote: In passing, the current strategy of preserving trailing requires expressions in `TransformLambdaExpr` confuses me: https://github.com/llvm/llvm-project/blob/f13aac6517532bd1ec016d432c23e92ab6450313/clang/lib/Sema/TreeTransform.h#L13686-L13692 Is there a reason why we decided *no

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79568 >From 386c17d55f68155b711672f87d803eb934372a70 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 26 Jan 2024 18:03:37 +0800 Subject: [PATCH 1/2] [Concepts] Traverse the instantiation chain for parameter inj

[clang] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79568 >From 386c17d55f68155b711672f87d803eb934372a70 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 26 Jan 2024 18:03:37 +0800 Subject: [PATCH 1/2] [Concepts] Traverse the instantiation chain for parameter inj

[llvm] [clang] [clang-tools-extra] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
zyn0217 wrote: The failing libcxx test `libcxx/gdb/gdb_pretty_printer_test.sh.cpp` doesn't appear to relate to this patch, so I'm landing it anyway. https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[llvm] [clang] [clang-tools-extra] [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (PR #79568)

2024-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/79568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [concepts] Set up an instantiation scope for constraint expression comparison (PR #79698)

2024-01-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/79698 This is a follow-up for the comparison of constraints on out-of-line function template definitions. We require the instantiation of a ParmVarDecl while transforming the expression if that Decl gets referenced by

[clang] [concepts] Set up an instantiation scope for constraint expression comparison (PR #79698)

2024-01-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/79698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang][Sema] fix deducing auto& from const int in template parameters is impossible in partial specializations (PR #79733)

2024-01-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79733 >From 9834d065580a668f94f74adaf8507ca672e9118f Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Jan 2024 15:12:01 +0800 Subject: [PATCH] [Clang][Sema] fix deducing auto& from const int in template parameters

[clang-tools-extra] [clangd] Fix is spelled in source bug (PR #76668)

2024-01-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (A drive-by comment: I stumbled on the commit message of this PR and found it surprising that I'm the co-author of it! I'm not entirely clear on GitHub's schemas, but IMO shouldn't the co-author be the one who clicks the "merge" button?) https://github.com/llvm/llvm-project/pul

[clang] [concepts] Set up an instantiation scope for constraint expression comparison (PR #79698)

2024-01-30 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I've seen `llvm-libc++-shared.cfg.in :: libcxx/gdb/gdb_pretty_printer_test.sh.cpp` was failing intermittently on CI recently, which turned out to be unrelated to Concepts. In case I missed anything, I've run the libcxx tests locally, which are all green. ```txt Testing Time: 14

[lld] [flang] [clang] [clang-tools-extra] [libc] [libcxx] [llvm] [lldb] [compiler-rt] [concepts] Set up an instantiation scope for constraint expression comparison (PR #79698)

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79698 >From 39f64e6fa02392415f0e2776166d4451346e7e81 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 28 Jan 2024 01:17:32 +0800 Subject: [PATCH] [concepts] Set up an instantiation scope for constraint expressio

[lld] [flang] [clang] [clang-tools-extra] [libc] [libcxx] [llvm] [lldb] [compiler-rt] [concepts] Set up an instantiation scope for constraint expression comparison (PR #79698)

2024-01-30 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I'll try the CI again before landing it. https://github.com/llvm/llvm-project/pull/79698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [concepts] Push a CurContext before substituting into out-of-line constraints for comparison (PR #79985)

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/79985 `InjectedClassNameType` is such that every template specialization within the Record scope ought to canonicalize to it, as outlined above the definition of that Type. This invariant is maintained during the tre

[lld] [clang] [llvm] [lldb] [clang-tools-extra] [libc] [compiler-rt] [libcxx] [flang] [concepts] Push a CurContext before substituting into out-of-line constraints for comparison (PR #79985)

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79985 >From 7ee1874af426d7879d218c6b8852fca0a87b1836 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 30 Jan 2024 18:49:08 +0800 Subject: [PATCH] [concepts] Push a CurContext before substituting into out-of-line

[lld] [clang] [llvm] [lldb] [clang-tools-extra] [libc] [compiler-rt] [libcxx] [flang] [concepts] Set up an instantiation scope for constraint expression comparison (PR #79698)

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/79698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [libc] [lldb] [llvm] [clang-tools-extra] [flang] [libcxx] [compiler-rt] [concepts] Push a CurContext before substituting into out-of-line constraints for comparison (PR #79985)

2024-01-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/79985 >From 7ee1874af426d7879d218c6b8852fca0a87b1836 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 30 Jan 2024 18:49:08 +0800 Subject: [PATCH] [concepts] Push a CurContext before substituting into out-of-line

[clang] [Clang][Sema] Extract ellipsis location from CXXFoldExpr for reattaching constraints on NTTPs (PR #78080)

2024-01-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/78080 We build up a `CXXFoldExpr` for immediately declared constraints as per C++20 [temp.param]/4. This is done by `formImmediatelyDeclaredConstraint` where an `EllipsisLoc` is essential to determine whether this is

[clang] [Clang][Sema] Extract ellipsis location from CXXFoldExpr for reattaching constraints on NTTPs (PR #78080)

2024-01-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/78080 >From 7c0b5ffe4b377f198308b976eb726138837145c4 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 14 Jan 2024 12:21:33 +0800 Subject: [PATCH 1/2] [Clang][Sema] Extract ellipsis location from CXXFoldExpr for

[clang-tools-extra] [clangd] Don't collect templated decls for builtin templates (PR #78466)

2024-01-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/78466 Builtin templates e.g. `__make_integer_seq`, `__type_pack_element` are such that they don't have alias *Decls*. [D133262](https://reviews.llvm.org/D133262) marked these as alias templates, resulting in an attemp

[clang] [clang] reject to capture variable in `RequiresExprBodyDecl` (PR #78598)

2024-01-18 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I think this also fixes https://github.com/llvm/llvm-project/issues/63845 and the example in https://github.com/llvm/llvm-project/issues/41751#issuecomment-1696389046. https://github.com/llvm/llvm-project/pull/78598 ___ cfe-commits mai

[clang-tools-extra] [clangd] Don't collect templated decls for builtin templates (PR #78466)

2024-01-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/78466 >From efa5098e9ca433654ef3bc439c422867e4abee41 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 18 Jan 2024 00:15:18 +0800 Subject: [PATCH 1/2] [clangd] Don't collect templated decls for builtin templates

[clang-tools-extra] [clangd] Don't collect templated decls for builtin templates (PR #78466)

2024-01-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/78466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colleā€¦ (PR #69224)

2023-10-21 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Sorry for my late update - I've had a busy week ;) > I don't think so as they don't have parameter or capture list +1. and it looks like we don't allow expanding a pack outside a statement expression, which more or less prevents the appearance of `FunctionParmPackExpr`. > so i

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/69224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/69224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/69224 >From 89e486690f1a28900152d4eef023be6fdfcf296a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 16 Oct 2023 22:50:08 +0800 Subject: [PATCH] [clang][Sema] Avoid non-empty unexpanded pack assertion for Funct

[clang-tools-extra] [clangd] Show alignment for records and fields decls (PR #67213)

2023-10-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thank you @Endilll for the explanation. The remaining part looks good; @sr-tream Do you have access to land the PR? If not, I'm glad to help you. :) https://github.com/llvm/llvm-project/pull/67213 ___ cfe-commits mailing list cfe-commit

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-23 Thread Younan Zhang via cfe-commits
@@ -402,6 +402,20 @@ bool Sema::DiagnoseUnexpandedParameterPack(Expr *E, if (!E->containsUnexpandedParameterPack()) return false; + // Exception: The `CollectUnexpandedParameterPacksVisitor` collects nothing + // from a FunctionParmPackExpr. In the context where the co

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/69224 >From ec6425590890e050dc212a7e13ca27c866a4fb22 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 16 Oct 2023 22:50:08 +0800 Subject: [PATCH 1/2] [clang][Sema] Avoid non-empty unexpanded pack assertion for F

<    1   2   3   4   5   6   7   8   9   10   >