[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

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

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/85497 >From 6d61aa1e43bb522412904bdd77c7f1cfc4b42889 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 12:33:58 +0800 Subject: [PATCH 1/5] [clangd] Support go-to-definition on type hints. The

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Younan Zhang via cfe-commits
@@ -367,7 +367,13 @@ class Checker { auto Hints = inlayHints(*AST, LineRange); for (const auto : Hints) { - vlog(" {0} {1} {2}", Hint.kind, Hint.position, Hint.label); + vlog(" {0} {1} [{2}]", Hint.kind, Hint.position, [&] { +return

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @dwblaikie Feel free to checkout this patch locally and see if it resolves the original issue - I won't merge it until you confirm it works or discover another issue that goes beyond the scope of this patch. (e.g. another aforementioned issue)

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > Hmm, actually - does this fix address /other/ ways a pack could appear, like > this? https://godbolt.org/z/oez8TbGqM > > Presumably a pack could appear in a variety of expressions, not just wrapped > in parens - could be in a function call (as in the above example), or nested

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-03-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86265 >From 6e7b38b3e3f781e11db2fa5d552fdfb6123609df Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 22 Mar 2024 17:34:08 +0800 Subject: [PATCH 1/2] [Sema] Preserve ContainsUnexpandedParameterPack in

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-03-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86265 >From 6e7b38b3e3f781e11db2fa5d552fdfb6123609df Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 22 Mar 2024 17:34:08 +0800 Subject: [PATCH 1/2] [Sema] Preserve ContainsUnexpandedParameterPack in

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-03-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86265 >From 6e7b38b3e3f781e11db2fa5d552fdfb6123609df Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 22 Mar 2024 17:34:08 +0800 Subject: [PATCH 1/3] [Sema] Preserve ContainsUnexpandedParameterPack in

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/86401 This is a follow-up for https://github.com/llvm/llvm-project/pull/69224, where the previous fix failed to handle the parentheses around the expression. Fixes https://github.com/llvm/llvm-project/issues/86361.

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86401 >From 1a990278196bf9c8753fe318f060f17fb8d0e669 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 24 Mar 2024 00:00:31 +0800 Subject: [PATCH] [clang][Sema] Ignore the parentheses in the guard of

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

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

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

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

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
@@ -1836,7 +1836,19 @@ static TemplateParameterList *GetTemplateParameterList(TemplateDecl *TD) { // Make sure we get the template parameter list from the most // recent declaration, since that is the only one that is guaranteed to // have all the default template

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86914 >From b31ca786d937dc180ad02042132596b2e5f3710f Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 28 Mar 2024 14:13:12 +0800 Subject: [PATCH 1/4] [clang][Sema] Fix a CTAD regression after 42239d2e9 The most

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
@@ -1836,7 +1836,19 @@ static TemplateParameterList *GetTemplateParameterList(TemplateDecl *TD) { // Make sure we get the template parameter list from the most // recent declaration, since that is the only one that is guaranteed to // have all the default template

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
@@ -1836,7 +1836,19 @@ static TemplateParameterList *GetTemplateParameterList(TemplateDecl *TD) { // Make sure we get the template parameter list from the most // recent declaration, since that is the only one that is guaranteed to // have all the default template

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (Since there haven't been any changes besides comments after the very first commit, which has passed the CI, so I'm landing it anyway.) https://github.com/llvm/llvm-project/pull/86914 ___ cfe-commits mailing list

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

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

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/86914 The most recent declaration of a template as a friend can introduce a different template parameter depth compared to what we anticipate from a CTAD guide. Fixes https://github.com/llvm/llvm-project/issues/86769

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

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

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/3] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/4] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/4] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

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

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-04-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I think I'm ready for feedback after around one week of dogfooding myself. https://github.com/llvm/llvm-project/pull/86629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/86629 ___ 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-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/82310 ___ 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-04-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thank you folks for the insightful review! I'm merging this PR now. https://github.com/llvm/llvm-project/pull/82310 ___ 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-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/82310 ___ 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-04-04 Thread Younan Zhang via cfe-commits
@@ -80,6 +80,81 @@ struct Response { return R; } }; + +// Retrieve the primary template for a lambda call operator. It's +// unfortunate that we only have the mappings of call operators rather +// than lambda classes. +const FunctionDecl *

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

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

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/87768 >From bcebf176cd078c59bca9a2301931f0ec072b66c7 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 5 Apr 2024 19:12:28 +0800 Subject: [PATCH] [Clang][Sema] Avoid guessing unexpanded packs' size in

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

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

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

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

[clang] [Sema][NFC] Cleanups after 843cc474f (PR #87996)

2024-04-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/87996 ___ 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-04-08 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @jcsxky At the glance of the stacktrace, I suspect we probably need some mechanism of deferral codegen while instantiating the enclosing struct. Can you please file a separate issue? https://github.com/llvm/llvm-project/pull/82310 ___

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/87768 None >From eb6c961896646a62f334284093994160d8c0e38e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 5 Apr 2024 19:12:28 +0800 Subject: [PATCH] [clang][Sema] Avoid guessing unexpanded packs' size in

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

2024-04-01 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Friendly ping @cor3ntin and @erichkeane if you're back in the offices. https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Fix: exclude insertions at end of CursorPlaceholder in formatting (PR #87746)

2024-04-06 Thread Younan Zhang via cfe-commits
zyn0217 wrote: AFAIK the Windows CI has been rather fragile recently, and I think you could probably ignore it. https://github.com/llvm/llvm-project/pull/87746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @dwblaikie : You're right. The patch is insufficient because the `FunctionParmPackExpr` in your example could also be wrapped with e.g. ``` CallExpr 0x649b0cf0 '' |-UnresolvedLookupExpr 0x649af8f8 '' lvalue (ADL) = 'f1' 0x64990e98 `-FunctionParmPackExpr

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

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

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-28 Thread Younan Zhang via cfe-commits
@@ -1836,7 +1836,19 @@ static TemplateParameterList *GetTemplateParameterList(TemplateDecl *TD) { // Make sure we get the template parameter list from the most // recent declaration, since that is the only one that is guaranteed to // have all the default template

[clang] [clang] Bailout when the substitution of template parameter mapping is invalid. (PR #86869)

2024-03-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! This reminds me that I should also check the validity of InstantiatingTemplate after introducing a new CodeSynthesisContext in my patch of fixing lambda calls within type alias decls.

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

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

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
@@ -1836,7 +1836,19 @@ static TemplateParameterList *GetTemplateParameterList(TemplateDecl *TD) { // Make sure we get the template parameter list from the most // recent declaration, since that is the only one that is guaranteed to // have all the default template

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86914 >From b31ca786d937dc180ad02042132596b2e5f3710f Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 28 Mar 2024 14:13:12 +0800 Subject: [PATCH 1/2] [clang][Sema] Fix a CTAD regression after 42239d2e9 The most

[clang] [clang][Sema] Fix a CTAD regression after 42239d2e9 (PR #86914)

2024-03-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86914 >From b31ca786d937dc180ad02042132596b2e5f3710f Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 28 Mar 2024 14:13:12 +0800 Subject: [PATCH 1/3] [clang][Sema] Fix a CTAD regression after 42239d2e9 The most

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-04-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/9] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

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

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/5] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/6] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/7] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-04-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/8] [clangd] Support go-to-definition on type hints. The core

[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-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed 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-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: All done. Thanks for the review & wording suggestions! (I'll try the windows CI again before landing it.) https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

[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

[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

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

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

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

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

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

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-17 Thread Younan Zhang via cfe-commits
@@ -4377,15 +4377,20 @@ class PackIndexingExpr final // The pack being indexed, followed by the index Stmt *SubExprs[2]; - size_t TransformedExpressions; + // The size of the trailing expressions. + unsigned TransformedExpressions : 31; zyn0217 wrote:

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/92385 >From 7acbb1dd89dbe266c3e53ab30178ac570722c759 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 16 May 2024 19:06:25 +0800 Subject: [PATCH 1/2] [Clang][Sema] Avoid pack expansion for expanded empty

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: @cor3ntin PTAL. Thanks! https://github.com/llvm/llvm-project/pull/92385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-17 Thread Younan Zhang via cfe-commits
@@ -2157,11 +2157,11 @@ void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) { void ASTStmtWriter::VisitPackIndexingExpr(PackIndexingExpr *E) { VisitExpr(E); Record.push_back(E->TransformedExpressions); + Record.push_back(E->EmptyPack);

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-17 Thread Younan Zhang via cfe-commits
@@ -4377,15 +4377,20 @@ class PackIndexingExpr final // The pack being indexed, followed by the index Stmt *SubExprs[2]; - size_t TransformedExpressions; + // The size of the trailing expressions. + unsigned TransformedExpressions : 31; zyn0217 wrote:

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

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

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-23 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Unfortunately, @l1nxy told me privately that he will not take over that patch as anticipated. So I hope I can continue the work. I'll add a release note and supplement some comments tomorrow. https://github.com/llvm/llvm-project/pull/93206

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/93206 This patch picks up #78598 with the hope that we can address such crashes in `tryCaptureVariable` for unevaluated lambdas. Fixes #88081 Fixes #69307 Fixes #91633 Fixes #90669 Fixes #89496 >From

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-23 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (What's going on with the pre-commit CI? Does it disappear?) https://github.com/llvm/llvm-project/pull/93206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-23 Thread Younan Zhang via cfe-commits
@@ -1036,6 +1036,7 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer , // be dependent, because there are template parameters in scope. CXXRecordDecl::LambdaDependencyKind LambdaDependencyKind = CXXRecordDecl::LDK_Unknown; +

[clang] [clang][CodeComplete] Recurse into the subexpression of deref operator in getApproximateType (PR #93404)

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

[clang] [clang][CodeComplete] Recurse into the subexpression of deref operator in getApproximateType (PR #93404)

2024-05-27 Thread Younan Zhang via cfe-commits
@@ -5680,8 +5680,16 @@ QualType getApproximateType(const Expr *E) { } } if (const auto *UO = llvm::dyn_cast(E)) { -if (UO->getOpcode() == UnaryOperatorKind::UO_Deref) - return UO->getSubExpr()->getType()->getPointeeType(); +if (UO->getOpcode() ==

[clang] [clang][CodeComplete] Recurse into the subexpression of deref operator in getApproximateType (PR #93404)

2024-05-27 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (I'll merge it shortly if CI turns green because I encountered the bug the other day in our codebase. Apologies I didn't point it out in my review for https://github.com/llvm/llvm-project/commit/bc31be7949a3d5382be0e15e3957fa957da9de45)

[clang] [clang][CodeComplete] Recurse into the subexpression of deref operator in getApproximateType (PR #93404)

2024-05-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/93404 >From 7639cb738dfb876c7abdf7337fad3aa80e912736 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 26 May 2024 15:52:31 +0800 Subject: [PATCH 1/2] [clang][CodeComplete] Recurse into the subexpression of

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

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

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! LG modulo one nit. https://github.com/llvm/llvm-project/pull/93460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly diagnose a static function overloading a non-static function (PR #93460)

2024-05-27 Thread Younan Zhang via cfe-commits
@@ -797,6 +797,8 @@ Bug Fixes to C++ Support in dependent contexts. Fixes (#GH92680). - Fixed a crash when diagnosing failed conversions involving template parameter packs. (#GH93076) +- Fixed a regression introduced in Clang 18 causing a static function overloading a

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

2024-05-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/93206 >From 658e9d46adf6dd79aa6aef03a1817444a880348a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 23 May 2024 22:35:11 +0800 Subject: [PATCH] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

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

[clang] [Clang][Sema] Tweak tryCaptureVariable for unevaluated lambdas (PR #93206)

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

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/92385 >From 7acbb1dd89dbe266c3e53ab30178ac570722c759 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 16 May 2024 19:06:25 +0800 Subject: [PATCH 1/3] [Clang][Sema] Avoid pack expansion for expanded empty

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-20 Thread Younan Zhang via cfe-commits
@@ -2157,11 +2157,11 @@ void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) { void ASTStmtWriter::VisitPackIndexingExpr(PackIndexingExpr *E) { VisitExpr(E); Record.push_back(E->TransformedExpressions); + Record.push_back(E->EmptyPack);

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-20 Thread Younan Zhang via cfe-commits
@@ -2157,11 +2157,11 @@ void ASTStmtWriter::VisitSizeOfPackExpr(SizeOfPackExpr *E) { void ASTStmtWriter::VisitPackIndexingExpr(PackIndexingExpr *E) { VisitExpr(E); Record.push_back(E->TransformedExpressions); + Record.push_back(E->EmptyPack);

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/92385 >From 7acbb1dd89dbe266c3e53ab30178ac570722c759 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 16 May 2024 19:06:25 +0800 Subject: [PATCH 1/4] [Clang][Sema] Avoid pack expansion for expanded empty

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

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

[clang] [Clang] Fix overloading for constrained variadic functions (PR #93817)

2024-05-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/93817 ___ 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-04-08 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > Still crash on > > ```c++ > template constexpr auto x = F(); > template constexpr int a() { return 1; } > > template > struct A { > using Func = decltype( > [](T) { > return x<[] constexpr { return a(); }>; > // return x<[] constexpr { return b(); }>;

[clang] [Sema][NFC] Cleanups after 843cc474f (PR #87996)

2024-04-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/87996 I forgot to tidy up these lines that should've been done in the previous commit, specifically: 1. Merge two `CodeSynthesisContext`s into one in `CheckTemplateIdType`. 2. Remove some gratuitous `Sema::`

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-05-21 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > It seems this change cause https://godbolt.org/z/311nb6xYe to fail. Could you > please take look? > Also: > https://godbolt.org/z/bYs7Y9v11 I don't see any justification that these examples should compile: the first example is a typical one handled by #90152 (from the

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-05-21 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @jyu2-git Are you sure this is the patch you’re looking for? The diagnostic there is completely unrelated and I think the right patch is https://github.com/llvm/llvm-project/pull/90152. https://github.com/llvm/llvm-project/pull/89019

<    1   2   3   4   5   6   >