[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-11 Thread Younan Zhang via cfe-commits
@@ -168,3 +168,30 @@ auto lambda4 = [] requires(sizeof(char) == 1){}; // expected-error {{expected bo #if __cplusplus <= 202002L // expected-warning@-2{{lambda without a parameter clause is a C++23 extension}} #endif + +namespace GH78524 { + +template T Foo; + +template

[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-11 Thread Younan Zhang via cfe-commits
@@ -1385,6 +1385,11 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // The

[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-11 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/3] GH78524 --- clang/docs/ReleaseNotes.rst |

[clang] [Sema] 81145 (PR #81150)

2024-02-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/81150 >From d9fe7f3777a27057181eaa008577fc13a30d30ee Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 10 Feb 2024 15:34:36 +0800 Subject: [PATCH 1/3] fixup --- clang/include/clang/AST/DeclCXX.h | 6

[clang] [Sema] 81145 (PR #81150)

2024-02-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/81150 >From d9fe7f3777a27057181eaa008577fc13a30d30ee Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 10 Feb 2024 15:34:36 +0800 Subject: [PATCH 1/2] fixup --- clang/include/clang/AST/DeclCXX.h | 6

[clang] [Sema] 81145 (PR #81150)

2024-02-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/81150 >From d9fe7f3777a27057181eaa008577fc13a30d30ee Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 10 Feb 2024 15:34:36 +0800 Subject: [PATCH] fixup --- clang/include/clang/AST/DeclCXX.h | 6

[clang] [Sema] 81145 (PR #81150)

2024-02-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/81150 None >From e2ea5d44935209d13c9eb33c089e4f58f2231acd Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 8 Feb 2024 23:44:56 +0800 Subject: [PATCH] [Sema] 81145 ---

[clang] GH70601 (PR #81095)

2024-02-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/81095 Testing libc++'s CI. >From 906fbf5b0796a85bf54028dfaa8e6343ea441a51 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 8 Feb 2024 15:07:47 +0800 Subject: [PATCH] GH70601 ---

[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] [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] [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] 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 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] 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-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-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/2] [concepts] Fixes for gh72557 --- clang/docs/ReleaseNotes.rst

[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] [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] 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] 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-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

[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

[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

[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?

[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

[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

[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

[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

[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

[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] 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-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

[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

[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... -// -//

[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... -// -//

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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:

[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?)

[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

[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] [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

[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

[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

[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

[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] [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

[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

[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] [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

[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-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-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] [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

[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

[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] [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-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

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

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

2024-01-11 Thread Younan Zhang via cfe-commits
zyn0217 wrote: The CI failure on windows seems irrelevant, so I'm landing it anyway. ``` FAILED: tools/clang/tools/extra/clangd/CompletionModel.h tools/clang/tools/extra/clangd/CompletionModel.cpp cmd.exe /C "cd /D C:\ws\src\build\tools\clang\tools\extra\clangd && C:\Python39\python.exe

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

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

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

2024-01-10 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (I'll land it once the CI turns green.) https://github.com/llvm/llvm-project/pull/76329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

2024-01-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/76329 >From c894b9375ebbd1ab58c33a22297bebcd5394a1af Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 24 Dec 2023 18:08:30 +0800 Subject: [PATCH 1/3] [clangd] Handle lambda scopes inside Node::getDeclContext()

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

2024-01-10 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Sorry for being silent for a few days, I've been a bit occupied recently and hopefully I could get back to the heuristic patch for templates soon. > I went through the existing callers of Node::getDeclContext(), and I was able > to construct a test case where the patch actually

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

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

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

2024-01-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/76811 >From e017bed2ee443d72f445f584dd6356bf151c5d79 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 3 Jan 2024 19:33:01 +0800 Subject: [PATCH 1/4] [Clang] Correctly construct template arguments for file-scope

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

2024-01-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/76811 >From e017bed2ee443d72f445f584dd6356bf151c5d79 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 3 Jan 2024 19:33:01 +0800 Subject: [PATCH 1/3] [Clang] Correctly construct template arguments for file-scope

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

2024-01-05 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > That TTPD eventually DOES get the correct decl context, right? Or have you > found a case where the decl context is NEVER set right? 1) I believe so, yes; 2) Not yet, but I would keep an eye on issues. So I presume the removal for declcontexts is correct (at least) at the

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

2024-01-05 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thank you for the feedback. > I wouldn't be surprised if it is now being used in situations where the > decl-context hasn't been appropriately updated I think this is not the case where we’re dealing with ill-formed Decl-contexts; it is that the caller site doesn't respect the

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

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

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2024-01-05 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thank you folks! https://github.com/llvm/llvm-project/pull/75001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2024-01-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/75001 >From 8681b3c9f5e19b6ae977321d5d4154113273c2a0 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 12 Nov 2023 13:21:03 +0800 Subject: [PATCH 1/2] [clang] Correctly implement CWG 2672 This is a follow-up

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

2024-01-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/76811 >From 1164c705a8515d39bc9d4404e8523da8876d81cf Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 3 Jan 2024 19:33:01 +0800 Subject: [PATCH 1/3] [Clang] Correctly construct template arguments for file-scope

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

2024-01-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/76811 >From 1164c705a8515d39bc9d4404e8523da8876d81cf Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 3 Jan 2024 19:33:01 +0800 Subject: [PATCH 1/3] [Clang] Correctly construct template arguments for file-scope

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

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

[clang] [Clang] Correctly construct template arguments for template template parameters (PR #76811)

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

[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

2024-01-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/76811 >From 1164c705a8515d39bc9d4404e8523da8876d81cf Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 3 Jan 2024 19:33:01 +0800 Subject: [PATCH 1/2] [Clang] Correctly construct template arguments for file-scope

[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

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

[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

2024-01-04 Thread Younan Zhang via cfe-commits
@@ -345,15 +345,19 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( using namespace TemplateInstArgsHelpers; const Decl *CurDecl = ND; + + if (!ND) zyn0217 wrote: > Can we also get a comment here why this makes sense to call >

[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

2024-01-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Just get back to this again. So, I have explored the other case and found it particular to explicit template arguments. In fact, we could slightly revise the motivating case to ```cpp template concept C = false; template typename T> int wow(T ts); template struct S {};

[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

2024-01-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: It is interesting to note that, if we exchange the position of two template parameters, i.e. ```cpp template concept C = false; template struct S {}; template typename T, unsigned N> // The template-template parameter now precedes the NTTP int wow(T ts); int main() {

[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

2024-01-03 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I realized this still crashes the code with NTTP. I will look into this. ```cpp template concept C = false; template struct S {}; template typename T> auto wow(T ts) { return ts.x; } int main() { return wow<3>(S{}); } ``` https://github.com/llvm/llvm-project/pull/76811

[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

2024-01-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/76811 This fixes the bug introduced by https://github.com/llvm/llvm-project/commit/6db007a0654ed7a6ed5c3aa3b61a937c19a6bc6b. We construct placeholder template arguments for template-template parameters to avoid

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

2024-01-01 Thread Younan Zhang via cfe-commits
@@ -232,7 +232,12 @@ bool isSpelledInSource(SourceLocation Loc, const SourceManager ) { if (Loc.isFileID()) return true; auto Spelling = SM.getDecomposedSpellingLoc(Loc); - StringRef SpellingFile = SM.getSLocEntry(Spelling.first).getFile().getName(); + bool

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

2024-01-01 Thread Younan Zhang via cfe-commits
@@ -232,7 +232,12 @@ bool isSpelledInSource(SourceLocation Loc, const SourceManager ) { if (Loc.isFileID()) return true; auto Spelling = SM.getDecomposedSpellingLoc(Loc); - StringRef SpellingFile = SM.getSLocEntry(Spelling.first).getFile().getName(); + bool

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

2024-01-01 Thread Younan Zhang via cfe-commits
@@ -813,6 +813,21 @@ TEST(SourceCodeTests, isKeywords) { EXPECT_FALSE(isKeyword("override", LangOpts)); } +TEST(SourceCodeTests, isSpelledInSource) { + Annotations Test(R"cpp( +int abc = 1; +)cpp"); + + ParsedAST AST = TestTU::withCode(Test.code()).build(); +

<    1   2   3   4   5   6   >