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

2024-04-15 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed 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-04-15 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85198 >From 0076d87897371f3467c49818a7789cedda27e485 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-04-15 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Ah, I had missed (thanks github review tool!) that the 'ImplicitObjectMember' > part already existed. Sorry for that. Never mind! Partly because I didn't make it more clear due to my poor expression . https://github.com/llvm/llvm-project/pull/85198

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

2024-04-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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-04-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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-04-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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-04-13 Thread Qizhi Hu via cfe-commits
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) -if (Method->isImplicitObjectMemberFunction()) +if (!isa(CurContext) && jcsxky wrote: And if only

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

2024-04-13 Thread Qizhi Hu via cfe-commits
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) -if (Method->isImplicitObjectMemberFunction()) +if (!isa(CurContext) && jcsxky wrote: Do you mean

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

2024-04-11 Thread Qizhi Hu via cfe-commits
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) -if (Method->isImplicitObjectMemberFunction()) +if (!isa(CurContext) && jcsxky wrote: @erichkeane I

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

2024-04-11 Thread Qizhi Hu via cfe-commits
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) -if (Method->isImplicitObjectMemberFunction()) +if (!isa(CurContext) && jcsxky wrote: Yeah, I think

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

2024-04-11 Thread Qizhi Hu via cfe-commits
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) -if (Method->isImplicitObjectMemberFunction()) +if (!isa(CurContext) && jcsxky wrote: In require

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

2024-04-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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-04-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky ready_for_review 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-04-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85198 >From a7bc05667f7280958e68fd82e01b620e18e4203c 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-04-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87173 >From a0c0feae5bee318bcc253e5497994bfe78f308ee Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 31 Mar 2024 09:38:05 +0800 Subject: [PATCH] [Clang][Sema] set declaration invalid earlier to prevent crash in

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87173 >From 26da477eb3633880734c096b13f89cc0d557745b Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 31 Mar 2024 09:38:05 +0800 Subject: [PATCH] [Clang][Sema] set declaration invalid earlier to prevent crash in

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

2024-04-08 Thread Qizhi Hu via cfe-commits
jcsxky 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

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

2024-04-08 Thread Qizhi Hu via cfe-commits
jcsxky wrote: Still crash on ```cpp 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(); }>; }.template

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

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

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87173 >From 51f3dc24417eb0b74f029b85b47519b6d152 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 31 Mar 2024 09:38:05 +0800 Subject: [PATCH] [Clang][Sema] set declaration invalid earlier to prevent crash in

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-07 Thread Qizhi Hu via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { jcsxky wrote: Ah, I see. I skip those checking

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-07 Thread Qizhi Hu via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { jcsxky wrote: These checks include name conflict

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-06 Thread Qizhi Hu via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { jcsxky wrote: `Sema::ActOnUsingEnumDeclaration`

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

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

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

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

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87144 >From c4adc0ae83294e4524f2740a40eee483c2cb Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sat, 30 Mar 2024 14:47:00 +0800 Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum declaration

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

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

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

2024-04-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87314 >From 1a1071845f2409dd07be454fb68ff42911fb62a2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 2 Apr 2024 13:18:14 +0800 Subject: [PATCH] [clang][ASTImporter] fix variable inline of CXX17 ---

[clang] [clang][ASTImporter] fix variable inline of CXX17 (PR #87314)

2024-04-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/87314 Fix crash int the testcase from https://github.com/llvm/llvm-project/issues/75114#issuecomment-1872595956 Forget to set inline of variable declaration would make `isThisDeclarationADefinition` get incorrect

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-01 Thread Qizhi Hu via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState , SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); +

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-01 Thread Qizhi Hu via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState , SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); +

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87173 >From 710a72c43ae9612e577172a978bfafe6553a6f9e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 31 Mar 2024 09:38:05 +0800 Subject: [PATCH] [Clang][Sema] set declaration invalid earlier to prevent crash in

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/87173 Try to fix https://github.com/llvm/llvm-project/issues/75221 This crash caused by calculating record layout which contains a field declaration with dependent type. Make it invalid when report diagnose to prevent

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87144 >From 8a0d7c30b2e0efae395143bcd599f3de8d018394 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sat, 30 Mar 2024 14:47:00 +0800 Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum declaration

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87144 >From 92da0db6815e07419256ea7fd531d0785a47d8fc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sat, 30 Mar 2024 14:47:00 +0800 Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum declaration

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87144 >From 6a0557097548d1a83592185a72c6609ee9ae0a17 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sat, 30 Mar 2024 14:47:00 +0800 Subject: [PATCH] [Clang][Sema] Skip checking anonymous enum in using enum declaration

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/87144 Try to fix https://github.com/llvm/llvm-project/issues/86790 Skip checking anonymous enumeration in using enum declaration. >From bff555ed0466a74a4e23d7d4feca2940ee04b719 Mon Sep 17 00:00:00 2001 From: huqizhi

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

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

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

2024-03-18 Thread Qizhi Hu via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType when build capture in CheckCXXThisCapture. jcsxky wrote: Thanks for your patience!

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

2024-03-18 Thread Qizhi Hu via cfe-commits
@@ -13714,6 +13714,12 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { // Capturing 'this' is trivial. if (C->capturesThis()) { + // We need ThisType when build capture in CheckCXXThisCapture. jcsxky wrote: Ah, I see. I didn't realize to

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

2024-03-18 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85565 >From b286dcfb2ae59d650e6b49fee97f159e2e958dcc 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-18 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @Sirraide Very thankful for your comments and it really makes the description more clear and easy to be understood! I have updated this patch following your suggestion and please take another look. https://github.com/llvm/llvm-project/pull/85565

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

2024-03-18 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/85565 >From e94505fa77155cb0bbdf3ef92a426ef070cb3833 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 edited https://github.com/llvm/llvm-project/pull/85565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 535617d786799c7657155e6e2cfa34fd3070f840 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 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 =

<    1   2   3   4   5   >