[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-17 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85565 >From 6aebe68afc9930b080d5a5690799a3689de2d055 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 17 Mar 2024 17:48:05 +0800 Subject: [PATCH] [Clang][Sema] Fix a crash in lambda instantiation ---

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-17 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85565 >From edaea6b244e9e35998421e551fb757e6ba099668 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 17 Mar 2024 17:48:05 +0800 Subject: [PATCH] [Clang][Sema] Fix a crash in lambda instantiation ---

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-17 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85565 >From f6338c5674ad7ca9ad7595a6fbce2526fcc3f055 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 17 Mar 2024 17:48:05 +0800 Subject: [PATCH] [Clang][Sema] Fix a crash in lambda instantiation ---

[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

2024-03-17 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/85565 Fix https://github.com/llvm/llvm-project/issues/85343 When build lambda expression in lambda instantiation, `ThisType` is required in `Sema::BuildCaptureInit`. Set it in `Sema::InstantiateFunctionDefinition` when

[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

2024-03-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky converted_to_draft https://github.com/llvm/llvm-project/pull/85198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

2024-03-14 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Please add a more useful PR description, since that's useful for reviewers > and ends up in the git log. Thanks for your remind! I am waiting for CI to finish and after that I will add the description. Maybe mark it with draft would be better.

[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

2024-03-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85198 >From 23a344395180cbdcd47618e3170e72260139d4b7 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 14 Mar 2024 16:32:36 +0800 Subject: [PATCH] [Clang][Sema] Fix issue on requires expression with templated base

[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

2024-03-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/85198 None >From 8925332a806b171bf2e12a7beb257ea85bd0a668 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 14 Mar 2024 16:32:36 +0800 Subject: [PATCH] [Clang][Sema] Fix issue on requires expression with templated

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/84671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From 849db0cede4d0fe108ec7cf530974606a426b9db Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking ---

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

2024-03-12 Thread Qizhi Hu via cfe-commits
jcsxky wrote: Probably I haven't understand these code deeply and I have some confusions on this patch. I wonder has this patch solved essential issue, or it just fixed the crash. I think some `static_assert` statements are required to demonstrate it does deduce the type of template

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -std=c++20 -verify %s +// RUN: %clang_cc1 -std=c++23 -verify %s +// expected-no-diagnostics + +template concept IsOk = requires() { typename T::Float; }; + +template struct Thing; + +template struct Foobar { jcsxky wrote:

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From fd1711b61478866ca1cd890a3dcfe3d1a8e1c211 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking ---

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

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/83847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From 1b71ce0ece77060591edaf69794e184d58ad9b15 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking ---

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The commit message and release note needs to be MUCH more detailed. Else I > think this looks like an acceptable patch. Thanks for you remind! I have updated commit message and release note to make it more clear. https://github.com/llvm/llvm-project/pull/84671

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From 52093e782c55fb5492070e8dc8686c06922b0997 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking ---

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/84671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-11 Thread Qizhi Hu via cfe-commits
@@ -259,6 +259,10 @@ Bug Fixes in This Version operator. Fixes (#GH83267). +- Allow access to a public template alias declaration that refers to friend's jcsxky wrote: Updated and put it to the right place.

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

2024-03-11 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -std=c++14 -verify %s +// RUN: %clang_cc1 -std=c++17 -verify %s +// RUN: %clang_cc1 -std=c++20 -verify %s jcsxky wrote: Fixed. https://github.com/llvm/llvm-project/pull/83847

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

2024-03-11 Thread Qizhi Hu via cfe-commits
@@ -409,7 +413,7 @@ RISC-V Support CUDA/HIP Language Changes ^ -- PTX is no longer included by default when compiling for CUDA. Using +- PTX is no longer included by default when compiling for CUDA. Using jcsxky wrote: Fixed.

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

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

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

2024-03-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 32bcc78c7d563bda920b3b6150dc1149e1ca1df1 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 043392e7b69e552ac5262df7ebf73e648844 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-11 Thread Qizhi Hu via cfe-commits
jcsxky wrote: gently ping~ https://github.com/llvm/llvm-project/pull/83847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From fba48b8ca75113fc8226e065c85ce276a4e9ed6b Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking ---

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/84671 Try to fix https://github.com/llvm/llvm-project/issues/84368 [temp.friend]p1: Similarly, each specialization of the `task` class template has the class template specialization `task` as a friend, and has all

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

2024-03-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/83847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 8541506bdbe26b9f24e47e5a372fe89124eaff47 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 76c7e3e19a1d5e3f35f1d3e9d9c99b76e973ff00 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 1c37abe8f7b26bd44fcf8e18a4cbc5104c7bd908 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From da384cdf38f64d7c956c07b007f417dd223177ef Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From a38ad9098c7f4dcffaa22b269bc2a36b5eb0fc4e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/83847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 2bb165ac6264b36f72716cb35ed2e1b4f72f3eaa Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 52a0191c1e817942dae080b70bd86e48018d4811 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From d60f27e47318b12aac3b462bc074af53ae1296bd Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From a38ad9098c7f4dcffaa22b269bc2a36b5eb0fc4e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/83987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83987 >From ed7bd1a4cec1d2a07d7af558d14c00474dee2af7 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 5 Mar 2024 18:02:01 +0800 Subject: [PATCH] [clang-tidy] fix false negative in

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Qizhi Hu via cfe-commits
@@ -156,7 +156,8 @@ Changes in existing checks - Improved :doc:`cppcoreguidelines-missing-std-forward ` check by no longer - giving false positives for deleted functions. + giving false positives for deleted functions and fix false negative when one + parameter is

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83987 >From d07d39771977e9d3b550c7598102a2bbe8f3266e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 5 Mar 2024 18:02:01 +0800 Subject: [PATCH] [clang-tidy] fix false negative in

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/83987 Try to fix https://github.com/llvm/llvm-project/issues/83845 When `std::forward` is invoked in a function, make sure it uses correct parameter by checking if the bounded `var` equals the parameter. >From

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

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 97b1ff819996ec096e8d0c91db4a67997ab4c0c9 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From e3c4715acdc1ead6596b1368590696a04e559414 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 712213e435fffa8bd27d3f0f204bc3d2cdcc40a4 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/83847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive in cppcoreguidelines-missing-std-forward (PR #77056)

2024-03-04 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > I agree to fix false positive reported in #68105. But for capturing in lambda > be reference and do forward in lambda, It is just like create a record by ref > instead of using forward and do forward in some member function. I don't > think it is an expected false positive. >

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

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 99b66fbb5f4219f225bbf8d01038b875b98f2d45 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

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

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/83847 None >From 6eed79fbcff40b308815cec4d1223e024040674d Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration

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

2024-02-20 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > @jcsxky Do you have more test cases other than the one from #76674? I wonder > what'll happen if constraint checking is involved. Do you mean `concept`? If yes, I will have a try. https://github.com/llvm/llvm-project/pull/80802 ___

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

2024-02-16 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From c19a66ed4eadd5f16b586b349fd578d873902be2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-13 Thread Qizhi Hu via cfe-commits
@@ -1614,7 +1614,19 @@ bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + bool DependentLambdaType = false; + QualType DesugaredType =

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

2024-02-13 Thread Qizhi Hu via cfe-commits
@@ -1614,7 +1614,19 @@ bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + bool DependentLambdaType = false; + QualType DesugaredType =

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

2024-02-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 5430d0709c2ae62bf1cf749b50ab312098ad3771 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 2f09be514adff0c5e19494b14fbe4cc9588fea9c Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-12 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @cor3ntin @erichkeane Could you please take another look at this PR? I think current version would be a reasonable fix since it transforms type only when it's needed. Or you have any other opinions? Thank you for guidance! https://github.com/llvm/llvm-project/pull/80802

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

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 0063efb61d8076d46289f76a490c28f2ca7f Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 59fb684ff051dc50eb6f8e4e1c294fd5a2dc55d0 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 78c54ee65b16d33a3c9b19c453ded69adfe62732 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 95f7690ccc843a5878ac212f467693877c40b232 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 376d5b0f6986f7cdf7bddd29fdbd418ba632da7a Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 1706840eccdabcd3d5cc8bd7a80c9db96d6230c3 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 2b55af4e11a637e268e498242041cb0fe482e375 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -verify -std=c++20 -emit-llvm -o - %s jcsxky wrote: removed `-verify` https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-06 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 9dbc077e263bc16ab3919b6691ee8c4585377caf Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -1613,8 +1613,8 @@ namespace { bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + if (T->isInstantiationDependentType() || T->isVariablyModifiedType()

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

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -1613,8 +1613,8 @@ namespace { bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + if (T->isInstantiationDependentType() || T->isVariablyModifiedType()

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

2024-02-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 741793c9584753e6e888c9824961501b676b1143 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 6dbd0937e8ded4dd8f71afb876bb3930c309 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/80802 Try to fix [issue](https://github.com/llvm/llvm-project/issues/76674) When transform a lambda expression which is declared in an unevaluated context, `isInstantiationDependentType()` and

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-03 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/80288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-03 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From cfcffbfa15959963b2b91078ec1911504811d3c1 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 329e78b18bf83fe984cc1ff8830f5a8be8cf3f7b Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 88c382b0af1ebc76e5d80d36ddb5345e0bc9f676 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 3d7adb18e15668216f39b2ba757b7b52bca99812 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
jcsxky wrote: details: ```cpp template constexpr int FuncAlign(int param = alignof(FunctionTemplateParam)); template <> template constexpr int Problem::FuncAlign(int param) { // depth of FunctionTemplateParam in default // initialization of

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/80288 Try to fix [issue](https://github.com/llvm/llvm-project/issues/68490 ) and some extented problem. Root cause of current issue is that error handling in instantiation of function parameter with default

[clang] Revert "[Clang][Sema] fix outline member function template with defau… (PR #80144)

2024-01-31 Thread Qizhi Hu via cfe-commits
jcsxky wrote: Thank for your help! https://github.com/llvm/llvm-project/pull/80144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] fix outline member function template with defau… (PR #80144)

2024-01-31 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky approved this pull request. https://github.com/llvm/llvm-project/pull/80144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-31 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > @jcsxky this patch introduced a regression. Please see the reproducer here: > https://godbolt.org/z/rEfWP75Ta. It compiles before this change and fails at > this change. It also compiles with gcc and clang-17. Sorry for importing new bugs. @erichkeane Could you help me revert

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

2024-01-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/79733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [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 Qizhi Hu via cfe-commits
jcsxky wrote: > Oh wow, thanks for this fix! It will need a Changelog entry. > > Does it fixes any of these issues? #68885 This patch can't fix #68885. I have looked into the code and the root cause maybe different (probably relate to ExprConst, I'm not sure). Need more work on that issue.

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

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

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

2024-01-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/79733 Fix [issue](https://github.com/llvm/llvm-project/issues/77189) AutoType is possible cv qualified. >From 35662b8929952af13eb31bc127144df2d7c1d003 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Jan 2024

[clang] [clang][ASTImporter] Improve import of variable template specializations. (PR #78284)

2024-01-26 Thread Qizhi Hu via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/jcsxky approved this pull request. https://github.com/llvm/llvm-project/pull/78284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ASTImporter] Improve import of variable template specializations. (PR #78284)

2024-01-26 Thread Qizhi Hu via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: jcsxky wrote: I have tested the code locally and testcase from this [issue](https://github.com/llvm/llvm-project/issues/75114) and all works fine. So, I approve this patch. https://github.com/llvm/llvm-project/pull/78284

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/78400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From fbf5cca3ecdbcc0a440c42a1f0f52552a0f8ece6 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 9e7ba80350e56f5dab87f7fc247744d8cd129c9e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform ---

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 707c471617b91b12914a10e3763e8d78aab9c112 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform ---

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > There seems to be an issue with the rebasing of the PR. As we branch clang > 18, the new changelog (for 19) being empty is expected I try to merge this PR and found `ReleaseNotes.rst` is changed because of clang-19 initialize. I don't know where should I add the release note.

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 2d6a39f5d679d2a29f606a49f07c596855f2d9d0 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform ---

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-25 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @cor3ntin I test this code ```cpp inline auto XXXYYY = [](auto a) { return [=]() { return 1; }; }; void foo(){ XXXYYY(1); } ``` after name mangling, clang outputs: ```cpp call void @_ZNK6XXXYYYMUlT_E_clIiEEDaS0_(ptr noundef nonnull align 1

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-23 Thread Qizhi Hu via cfe-commits
@@ -859,6 +859,9 @@ Bug Fixes in This Version Fixes (`#78290 `_) - Fixed assertion failure with deleted overloaded unary operators. Fixes (`#78314 `_) +- Fix crash when

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 71660611976c4f21f71ebfe509fc021b1e3586e2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

<    1   2   3   4   5   >