[clang-tools-extra] [clangd] Adapt Inlay Hint support for Deducing This (PR #68177)

2023-10-23 Thread Younan Zhang via cfe-commits
@@ -859,7 +872,9 @@ class InlayHintVisitor : public RecursiveASTVisitor { else ForwardedParams = {Params.begin(), Params.end()}; -NameVec ParameterNames = chooseParameterNames(ForwardedParams); +auto ForwardedParamsRef = zyn0217 wrote: Than

[clang-tools-extra] [clangd] Adapt Inlay Hint support for Deducing This (PR #68177)

2023-10-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/68177 >From f83f28d0d055066bb7660e24e2253a61273f014a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 4 Oct 2023 11:59:31 +0800 Subject: [PATCH 1/3] [clangd] Adapt Inlay Hint support for Deducing This This is a

[clang-tools-extra] [clangd] Adapt Inlay Hint support for Deducing This (PR #68177)

2023-10-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/68177 >From f83f28d0d055066bb7660e24e2253a61273f014a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 4 Oct 2023 11:59:31 +0800 Subject: [PATCH 1/4] [clangd] Adapt Inlay Hint support for Deducing This This is a

[clang-tools-extra] [clangd] Adapt Inlay Hint support for Deducing This (PR #68177)

2023-10-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/68177 ___ 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-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/69224 >From 07749e92c55cb4dfd01e81c9c8413b77c915aa42 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

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

2023-10-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/69224 >From 880f271cbad4aacb7647bc402f636adf12ca1147 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] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Done. Sorry for leaving irrelevant changes ;) 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] 23ef8bf - [clangd][CodeComplete] Improve FunctionCanBeCall

2023-09-28 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-09-28T21:42:02+08:00 New Revision: 23ef8bf9c0f338ee073c6c1b553c42e46d2f22ad URL: https://github.com/llvm/llvm-project/commit/23ef8bf9c0f338ee073c6c1b553c42e46d2f22ad DIFF: https://github.com/llvm/llvm-project/commit/23ef8bf9c0f338ee073c6c1b553c42e46d2f22ad.diff

[clang] 69a8636 - [clang][NFC] Remove redundant whitespaces

2023-08-19 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-08-19T19:25:32+08:00 New Revision: 69a8636c4dec2c9e561224e603ea9864a06bee3a URL: https://github.com/llvm/llvm-project/commit/69a8636c4dec2c9e561224e603ea9864a06bee3a DIFF: https://github.com/llvm/llvm-project/commit/69a8636c4dec2c9e561224e603ea9864a06bee3a.diff

[clang-tools-extra] b1193c1 - [clangd] Avoid unexpected desugaring in isSugaredTemplateParameter

2023-08-01 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-08-01T20:12:35+08:00 New Revision: b1193c13a5f9e9a2dca6ae0dd8b4e911f54c09ce URL: https://github.com/llvm/llvm-project/commit/b1193c13a5f9e9a2dca6ae0dd8b4e911f54c09ce DIFF: https://github.com/llvm/llvm-project/commit/b1193c13a5f9e9a2dca6ae0dd8b4e911f54c09ce.diff

[clang-tools-extra] cbd6ac6 - [clangd] Show parameter hints for operator()

2023-09-10 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-09-10T15:56:00+08:00 New Revision: cbd6ac6165e683f2eed4a5066c1ccf53bed0696d URL: https://github.com/llvm/llvm-project/commit/cbd6ac6165e683f2eed4a5066c1ccf53bed0696d DIFF: https://github.com/llvm/llvm-project/commit/cbd6ac6165e683f2eed4a5066c1ccf53bed0696d.diff

[clang] 2fd01d7 - [clang] Construct ExprRequirement with SubstitutionDiagnostic on SubstFailure

2023-09-01 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-09-01T15:49:39+08:00 New Revision: 2fd01d75a863184766ee0c82b5c0fc8be172448a URL: https://github.com/llvm/llvm-project/commit/2fd01d75a863184766ee0c82b5c0fc8be172448a DIFF: https://github.com/llvm/llvm-project/commit/2fd01d75a863184766ee0c82b5c0fc8be172448a.diff

[clang-tools-extra] e257c0a - [clang][clangd] Ensure the stack bottom before building AST

2023-09-02 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-09-02T18:53:06+08:00 New Revision: e257c0a9190637e44e292271103a13d70bec4b03 URL: https://github.com/llvm/llvm-project/commit/e257c0a9190637e44e292271103a13d70bec4b03 DIFF: https://github.com/llvm/llvm-project/commit/e257c0a9190637e44e292271103a13d70bec4b03.diff

[clang-tools-extra] 138adb0 - [clangd] Refine logic on $0 in completion snippets

2023-03-17 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-03-17T17:57:24+08:00 New Revision: 138adb0980328d6b958a732d6853d0111aa9cb51 URL: https://github.com/llvm/llvm-project/commit/138adb0980328d6b958a732d6853d0111aa9cb51 DIFF: https://github.com/llvm/llvm-project/commit/138adb0980328d6b958a732d6853d0111aa9cb51.diff

[clang-tools-extra] 0b103ed - [clangd] Fix a hover crash on unsigned 64bit value

2023-03-26 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-03-27T10:27:11+08:00 New Revision: 0b103edf5b2c6178c2725a9ff085c6ccc866bccb URL: https://github.com/llvm/llvm-project/commit/0b103edf5b2c6178c2725a9ff085c6ccc866bccb DIFF: https://github.com/llvm/llvm-project/commit/0b103edf5b2c6178c2725a9ff085c6ccc866bccb.diff

[clang-tools-extra] cb2d04d - [clangd] Hide inlay hints when using a macro as a calling argument that with a param comment

2023-02-26 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-02-26T19:06:44+08:00 New Revision: cb2d04d41e47e65812434f775215247bfe19b3dd URL: https://github.com/llvm/llvm-project/commit/cb2d04d41e47e65812434f775215247bfe19b3dd DIFF: https://github.com/llvm/llvm-project/commit/cb2d04d41e47e65812434f775215247bfe19b3dd.diff

[clang] 76d72a7 - [clang] Fix a crash on invalid destructor

2023-06-25 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-06-26T09:35:12+08:00 New Revision: 76d72a715038ae3bce711ddc372e7e273a5c2b6b URL: https://github.com/llvm/llvm-project/commit/76d72a715038ae3bce711ddc372e7e273a5c2b6b DIFF: https://github.com/llvm/llvm-project/commit/76d72a715038ae3bce711ddc372e7e273a5c2b6b.diff

[clang] d982643 - [clang] Implement CWG 2397

2023-04-12 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-04-12T22:30:23+08:00 New Revision: d9826433f31cd081d0229d47d7982b5bf3c0055f URL: https://github.com/llvm/llvm-project/commit/d9826433f31cd081d0229d47d7982b5bf3c0055f DIFF: https://github.com/llvm/llvm-project/commit/d9826433f31cd081d0229d47d7982b5bf3c0055f.diff

[clang] d4021ed - [Tooling/Inclusion] Add symbol mappings for `std::experimental::filesystem`

2023-02-13 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-02-14T01:07:39+08:00 New Revision: d4021ed3d79d8823317d894b55f4e6a30cfc3614 URL: https://github.com/llvm/llvm-project/commit/d4021ed3d79d8823317d894b55f4e6a30cfc3614 DIFF: https://github.com/llvm/llvm-project/commit/d4021ed3d79d8823317d894b55f4e6a30cfc3614.diff

[clang-tools-extra] 7385cc3 - [clangd] Support macro evaluation on hover

2023-05-09 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-05-09T18:50:27+08:00 New Revision: 7385cc389abad29eb9044d260b23dd483d674718 URL: https://github.com/llvm/llvm-project/commit/7385cc389abad29eb9044d260b23dd483d674718 DIFF: https://github.com/llvm/llvm-project/commit/7385cc389abad29eb9044d260b23dd483d674718.diff

[clang-tools-extra] 84deed2 - [clangd] Fix a build failure. NFC

2023-05-09 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-05-10T08:28:07+08:00 New Revision: 84deed2b7b6325f99d50ce46512de2c078cefb3a URL: https://github.com/llvm/llvm-project/commit/84deed2b7b6325f99d50ce46512de2c078cefb3a DIFF: https://github.com/llvm/llvm-project/commit/84deed2b7b6325f99d50ce46512de2c078cefb3a.diff

[clang-tools-extra] 7d68f2e - [clangd] Desugar template parameter aliases in type hints

2023-06-13 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-06-13T19:15:24+08:00 New Revision: 7d68f2ef411ea2188666c2f67a8ee8b923adb12d URL: https://github.com/llvm/llvm-project/commit/7d68f2ef411ea2188666c2f67a8ee8b923adb12d DIFF: https://github.com/llvm/llvm-project/commit/7d68f2ef411ea2188666c2f67a8ee8b923adb12d.diff

[clang-tools-extra] 5cdb906 - [clangd] Unify printing policy for type hints

2023-06-13 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-06-13T21:31:10+08:00 New Revision: 5cdb906f1e4093600f99aab8660e1536514a57e8 URL: https://github.com/llvm/llvm-project/commit/5cdb906f1e4093600f99aab8660e1536514a57e8 DIFF: https://github.com/llvm/llvm-project/commit/5cdb906f1e4093600f99aab8660e1536514a57e8.diff

[clang] 0e08374 - [clang][NFC] Add a notice to desugarForDiagnostic

2023-06-14 Thread Younan Zhang via cfe-commits
Author: Younan Zhang Date: 2023-06-15T11:55:06+08:00 New Revision: 0e08374abb2c61a3ae5c24d5f60be3b548da9778 URL: https://github.com/llvm/llvm-project/commit/0e08374abb2c61a3ae5c24d5f60be3b548da9778 DIFF: https://github.com/llvm/llvm-project/commit/0e08374abb2c61a3ae5c24d5f60be3b548da9778.diff

[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-15 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin gently ping 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] The lambda call inside of a type alias (PR #82310)

2024-02-19 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/82310 None >From 0f97fae5d1ba4debe04824e5d2d98598504d003d Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Feb 2024 14:54:14 +0800 Subject: [PATCH] The lambda call inside of a type alias --- clang/docs/Rele

[clang] The lambda call inside of a type alias (PR #82310)

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

[clang] The lambda call inside of a type alias (PR #82310)

2024-02-20 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-02-20 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-02-20 Thread Younan Zhang via cfe-commits
zyn0217 wrote: The Windows CI is still broken and I have to run the libc++ tests locally. 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-commit

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-20 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @jcsxky Do you have more test cases other than the one from #76674? I wonder what'll happen if constraint checking is involved. https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

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

2024-02-20 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Result for libc++ tests: ``` Failed Tests (1): llvm-libc++-shared.cfg.in :: libcxx/headers_in_modulemap.sh.py Testing Time: 1232.89s Total Discovered Tests: 9673 Unsupported : 585 (6.05%) Passed : 9062 (93.68%) Expectedly Failed: 25

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

2024-02-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review 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-02-20 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-02-20 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Also added @shafik for some insights on tests / other existing issues. 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-02-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/82310 >From 0f97fae5d1ba4debe04824e5d2d98598504d003d Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Feb 2024 14:54:14 +0800 Subject: [PATCH 1/3] 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-02-20 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Although this patch doesn't fix https://github.com/llvm/llvm-project/issues/82104 yet, which is a crash caused by a mismatch in the template argument during the return type deduction, I still tried a temporary workaround (turning some switches off / on for getTemplateInstantiat

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-21 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > That's because you are filtering only opened PRs, not including drafts PRs. > For example there is this draft PR: > https://github.com/llvm/llvm-project/pull/81095/files (I think my recent PR https://github.com/llvm/llvm-project/pull/82310 now supersedes my two draft PRs, and

[clang] GH70601 (PR #81095)

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

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

2024-02-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/81150 ___ 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: @cor3ntin would you mind taking a look? thanks! 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
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][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 https://lists.llvm.org/cgi-

[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] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

2024-07-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/96084 >From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 19 Jun 2024 23:25:13 +0800 Subject: [PATCH 01/11] [Clang] Add diagnostic notes for implcitly generated deduct

[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)

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

[clang] [Clang] use const references for function parameters in operator== and operator!= overloads in Redeclarable.h (PR #92963)

2024-07-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Please explicitly say NFC in the commit title. Otherwise, LGTM https://github.com/llvm/llvm-project/pull/92963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang][NFC] use const references for function parameters in operator== and operator!= overloads in Redeclarable.h (PR #92963)

2024-07-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: No problem! Do you need anyone else to help you commit it? https://github.com/llvm/llvm-project/pull/92963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] use const references for function parameters in operator== and operator!= overloads in Redeclarable.h (PR #92963)

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

[clang] [Clang][NFC] improve RewriteModernObjC code quality by using const reference for function parameters (PR #93252)

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

[clang] [Clang][NFC] improve RewriteModernObjC code quality by using const reference for function parameters (PR #93252)

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

[clang] [Clang] Substitute for the type aliases inside of a CTAD guide (PR #94740)

2024-07-04 Thread Younan Zhang via cfe-commits
@@ -2220,23 +2220,103 @@ namespace { class ExtractTypeForDeductionGuide : public TreeTransform { llvm::SmallVectorImpl &MaterializedTypedefs; + ClassTemplateDecl *NestedPattern; + const MultiLevelTemplateArgumentList *OuterInstantiationArgs; public: typedef TreeTran

[clang] [Clang] Substitute for the type aliases inside of a CTAD guide (PR #94740)

2024-07-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/94740 >From 2f60e51f2017e4448047f64983b2f22cdb67e816 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 7 Jun 2024 18:08:10 +0800 Subject: [PATCH 1/6] [Clang] Substitute for the type aliases inside of a CTAD guide

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/97166 >From 91a28dcde9dc569b955df92db91c858c550f6ad3 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 29 Jun 2024 21:32:01 +0800 Subject: [PATCH 1/3] [Clang] Add captures to the instantiation scope for noexcept

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/97166 >From 91a28dcde9dc569b955df92db91c858c550f6ad3 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 29 Jun 2024 21:32:01 +0800 Subject: [PATCH] [Clang] Add captures to the instantiation scope for noexcept spec

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

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

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks! I think the approach makes sense. Just some nits from me @cor3ntin do you have any other comments? I think you can do the last approval. :) https://github.com/llvm/llvm-project/pull/97215 ___ cfe-commits m

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Oh, I forgot it: this also needs a release note. https://github.com/llvm/llvm-project/pull/97215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. One nit, otherwise LGTM. Regarding the issue of attaching the constraint to a non-template function, pragmatically, this is just something internal to compiler, and we're still conforming to the standard in terms of the user's codes. So, i

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -3216,6 +3226,44 @@ void DeclareImplicitDeductionGuidesForTypeAlias( Guides.suppressDiagnostics(); for (auto *G : Guides) { +if (auto *DG = dyn_cast(G)) { + // The deduction guide is a non-template function decl, we just clone it. + auto *FunctionType = +

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

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

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

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

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -636,6 +636,9 @@ bool Sema::SetupConstraintScope( ? FD->getInstantiatedFromMemberFunction() : FD->getInstantiatedFromDecl(); +if (!InstantiatedFrom) + return true; + zyn0217 wrote: This is unnecessary. For both `TK_MemberSp

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/97913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/97166 >From 91a28dcde9dc569b955df92db91c858c550f6ad3 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 29 Jun 2024 21:32:01 +0800 Subject: [PATCH] [Clang] Add captures to the instantiation scope for noexcept spec

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

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

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks for the review. https://github.com/llvm/llvm-project/pull/97166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -60,3 +60,26 @@ template C1>> auto t3() { template C1>> auto t3(); static_assert(is_same()), X>>>); #endif + +namespace GH95735 { + +int g(int fn) { + return [f = fn](auto tpl) noexcept(noexcept(f)) { return f; }(0); +} + +int foo(auto... fn) { + // FIXME: This one hits th

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

2024-07-07 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

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

2024-07-07 Thread Younan Zhang via cfe-commits
@@ -1005,14 +1332,22 @@ class InlayHintVisitor : public RecursiveASTVisitor { // The sugared type is more useful in some cases, and the canonical // type in other cases. auto Desugared = maybeDesugar(AST, T); -std::string TypeName = Desugared.getAsString(TypeHi

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

2024-07-07 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-07-08 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

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

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

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

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

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

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -1005,14 +1332,22 @@ class InlayHintVisitor : public RecursiveASTVisitor { // The sugared type is more useful in some cases, and the canonical // type in other cases. auto Desugared = maybeDesugar(AST, T); -std::string TypeName = Desugared.getAsString(TypeHi

[clang] [Clang] Ensure the method scope at the late parsing of noexcept specifiers (PR #98023)

2024-07-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/98023 Previously, we only pushed the method scope once we entered the function definition, whereas tryCaptureVariable() requires at least one function scope available when being called. This led to problems parsing th

[clang] [Clang] Ensure the method scope at the late parsing of noexcept specifiers (PR #98023)

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -113,8 +113,9 @@ namespace Static { static auto g() -> decltype(this->m); // expected-error{{'this' cannot be used in a static member function declaration}} static int h(); - -static int i() noexcept(noexcept(m + 2)); // expected-error{{'this' cannot be im

[clang] [Clang] Preserve the fully-substituted flag in PackIndexingType (PR #107181)

2024-09-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/107181 We should avoid another round of transformation of the pattern if the pattern has already turned out to be an empty pack. As an outcome, the empty SubstTemplateTypeParmPackType won't occur, and we don't need to

[clang] [Clang] Preserve the fully-substituted flag in PackIndexingType (PR #107181)

2024-09-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/107181 >From 40421929c74a1494ba358457a9e6579b48998112 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 4 Sep 2024 12:50:32 +0800 Subject: [PATCH 1/2] [Clang] Preserve the fully-substituted flag in PackIndexingTy

[clang] [Clang] Preserve the fully-substituted flag in PackIndexingType (PR #107181)

2024-09-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > This looks reasonable but for pack expressions we added a > `ExpandedToEmptyPack` instead and i think there is value in having > consistency between types and expression packs indexing. WDYT? Makes sense to me :) https://github.com/llvm/llvm-project/pull/107181 __

[clang] [Clang] Preserve the ExpandsToEmpty flag in PackIndexingType (PR #107181)

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

[clang] [Clang] Preserve the ExpandsToEmpty flag in PackIndexingType (PR #107181)

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

[clang] [Clang] Preserve the ExpandsToEmpty flag in PackIndexingType (PR #107181)

2024-09-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/107181 >From 40421929c74a1494ba358457a9e6579b48998112 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 4 Sep 2024 12:50:32 +0800 Subject: [PATCH 1/2] [Clang] Preserve the fully-substituted flag in PackIndexingTy

[clang] [Clang] Preserve the ExpandsToEmpty flag in PackIndexingType (PR #107181)

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

[clang] [Clang] Fix crash with `source_location` in lambda declarators. (PR #107411)

2024-09-05 Thread Younan Zhang via cfe-commits
zyn0217 wrote: While looking at it, I found another bug where we seem to have problems mangling `std::source_location` https://clang.godbolt.org/z/467E19h45 https://github.com/llvm/llvm-project/pull/107411 ___ cfe-commits mailing list cfe-commits@list

[clang] [Clang] Fix crash with `source_location` in lambda declarators. (PR #107411)

2024-09-05 Thread Younan Zhang via cfe-commits
@@ -2287,6 +2288,15 @@ APValue SourceLocExpr::EvaluateInContext(const ASTContext &Ctx, Context = getParentContext(); } + // If we are currently parsing a lambda declarator, we might not have a fully + // formed call operator declaration yet, and we could not form a fu

[clang] [Clang] Don't assert non-empty packs for FunctionParmPackExprs (PR #107561)

2024-09-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/107561 `FunctionParmPackExpr`s are peculiar in that they have to be of unexpanded dependency while they don't introduce any unexpanded packs. So this patch rules them out in the non-empty pack assertion in `DiagnoseUn

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

2024-09-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed 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] Don't assert non-empty packs for FunctionParmPackExprs (PR #107561)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -1,13 +0,0 @@ -// RUN: %clang_cc1 -std=c++17 %s -fsyntax-only -verify - -template void g(Ts... p1s) { - (void)[&](auto... p2s) { ([&] { p1s; p2s; }, ...); }; -} - -void f1() { - g(); -} - -template void g2(Ts... p1s) { - (void)[&](auto... p2s) { [&] { p1s; p2s; }; }; // ex

[clang] [Clang] Don't assert non-empty packs for FunctionParmPackExprs (PR #107561)

2024-09-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/107561 >From 92a30ff72fd922df3c29ac31fc2c7d46df1ff84e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 6 Sep 2024 18:35:45 +0800 Subject: [PATCH 1/2] [Clang] Don't assert non-empty packs for FunctionParmPackExpr

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -1139,6 +1139,8 @@ class SignatureHelpCollector final : public CodeCompleteConsumer { switch (K) { case OC::CK_Aggregate: return 0; + case OC::CK_Lambda: +[[fallthrough]]; zyn0217 wrote: ```suggestion ``

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -1437,6 +1437,15 @@ TEST(SignatureHelpTest, Overloads) { EXPECT_EQ(0, Results.activeParameter); } +TEST(SignatureHelpTest, ShowLambdaNameInsteadOfOperatorParens) { + auto const Results = signatures(R"cpp( +auto foo = [](int x, int y){}; +int main() { foo(^); } --

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -4022,7 +4022,10 @@ CodeCompleteConsumer::OverloadCandidate::CreateSignatureString( std::string Name; llvm::raw_string_ostream OS(Name); -FDecl->getDeclName().print(OS, Policy); +auto const DeclName = (getKind() == CK_Lambda) zyn0217 wrote:

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef Args, SmallVector ArgExprs(1, NakedFn); ArgExprs.append(ArgsWithoutDependentTypes.begin(), ArgsWithoutDependentTypes.end()); +auto *const Lam

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef Args, SmallVector ArgExprs(1, NakedFn); ArgExprs.append(ArgsWithoutDependentTypes.begin(), ArgsWithoutDependentTypes.end()); +auto *const Lam

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef Args, SmallVector ArgExprs(1, NakedFn); ArgExprs.append(ArgsWithoutDependentTypes.begin(), ArgsWithoutDependentTypes.end()); +auto *const Lam

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-06 Thread Younan Zhang via cfe-commits
@@ -9147,7 +9147,8 @@ class Sema final : public SemaBase { /// /// \returns true if lookup succeeded, false if it failed. bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, - bool InUnqualifiedLookup = false); +

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