[clang] [Clang] Don't allow implicit this access when checking function constraints (PR #151276)

2025-07-29 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (I'll issue a backport in a few days) https://github.com/llvm/llvm-project/pull/151276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't allow implicit this access when checking function constraints (PR #151276)

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

[clang] [Clang][Sema] Expression in assumption attribute should be full expression (PR #150814)

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

[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-07-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/139066 >From a6ee1af04225063bab4d853611c7a57b1db37aa9 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 8 May 2025 19:42:51 +0800 Subject: [PATCH 1/4] [Clang] Do not eat SFINAE diagnostics for explicit template a

[clang] [clang] Fix issue with FoldingSet and DependentTemplateSpecialization… (PR #150559)

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

[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-07-24 Thread Younan Zhang via cfe-commits
@@ -12166,6 +12174,15 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, diag::note_ovl_candidate_explicit_arg_mismatch_unnamed) << (index + 1); } + +if (PartialDiagnosticAt *PDiag = DeductionFailure.getSFINAEDiagnost

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

2025-07-24 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @tstellar thanks! Feel free to open an issue about that if you got something :) https://github.com/llvm/llvm-project/pull/143096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

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

[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-07-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/139066 >From a6ee1af04225063bab4d853611c7a57b1db37aa9 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 8 May 2025 19:42:51 +0800 Subject: [PATCH 1/4] [Clang] Do not eat SFINAE diagnostics for explicit template a

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

2025-07-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/149782 >From 32be32e2ae072f920389c61e42b9e392a6b92798 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 21 Jul 2025 17:17:48 +0800 Subject: [PATCH 1/2] [Clang] Fix a partial ordering bug involving CTAD injected t

[clang] [Clang] Fix a crash on invalid concept (PR #150186)

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

[clang] [Clang] Fix a crash on invalid concept (PR #150186)

2025-07-23 Thread Younan Zhang via cfe-commits
@@ -588,6 +588,9 @@ static bool CheckConstraintSatisfaction( return true; for (const AssociatedConstraint &AC : AssociatedConstraints) { +if (AC.isNull()) + return true; zyn0217 wrote: Can we continue? https://github.com/llvm/llvm-project/pull

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

2025-07-22 Thread Younan Zhang via cfe-commits
@@ -5525,6 +5525,8 @@ static TemplateDeductionResult CheckDeductionConsistency( // FIXME: A substitution can be incomplete on a non-structural part of the // type. Use the canonical type for now, until the TemplateInstantiator can // deal with that. + if (auto *Injected

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

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

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

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

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

2025-07-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/149782 >From 32be32e2ae072f920389c61e42b9e392a6b92798 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 21 Jul 2025 17:17:48 +0800 Subject: [PATCH] [Clang] Fix a partial ordering bug involving CTAD injected templ

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

2025-07-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/149782 None >From cf42677637ce165d185c01fec974e83c246b0cf9 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 21 Jul 2025 17:17:48 +0800 Subject: [PATCH] [Clang] Fix a partial ordering bug involving CTAD injected

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

2025-07-18 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @tstellar Thanks for letting us know. Do you have a reduced version? Even just compling that reproducer on my machine takes ~30s so it's hard for me to run cvise https://github.com/llvm/llvm-project/pull/143096 ___ cfe-commits mailing

[clang] [Clang] Ensure correct parameters are in the scope for constraint equivalence checking (PR #149264)

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

[clang] [Clang] Ensure correct parameters are in the scope for constraint equivalence checking (PR #149264)

2025-07-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/149264 >From 728de4d995079208605879a0ec30e8f76fe5220c Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 17 Jul 2025 14:17:02 +0800 Subject: [PATCH 1/2] [Clang] Ensure correct parameters are in the scope for const

[clang] Revert "[Clang] Do not treat Foo -> const Foo conversion sequences as perfect" (PR #149272)

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

[clang] [Clang] Ensure correct parameters are in the scope for constraint equivalence checking (PR #149264)

2025-07-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/149264 >From 728de4d995079208605879a0ec30e8f76fe5220c Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 17 Jul 2025 14:17:02 +0800 Subject: [PATCH 1/2] [Clang] Ensure correct parameters are in the scope for const

[clang] Don't mark lambda non-dependent if nested in a generic lambda. (PR #149121)

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

[clang] Don't mark lambda non-dependent if nested in a generic lambda. (PR #149121)

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

[clang] Don't mark lambda non-dependent if nested in a generic lambda. (PR #149121)

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

[clang] Don't mark lambda non-dependent if nested in a generic lambda. (PR #149121)

2025-07-16 Thread Younan Zhang via cfe-commits
@@ -15512,6 +15512,8 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { DC = DC->getParent(); if ((getSema().isUnevaluatedContext() || getSema().isConstantEvaluatedContext()) && + !(dyn_cast_or_null(DC->getParent()) && +cast(DC->getParent())->isGe

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

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

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-13 Thread Younan Zhang via cfe-commits
@@ -1061,15 +1061,36 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef, SmallVector DeduceResults( F->getTemplateParameters()->size()); + // We don't have to deduce against the alias template specialization, + // if the source template is a synthesized alias deduction

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/147675 >From f8b1894ad39560edb5bb0c14194a3a2d54a911ff Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 9 Jul 2025 16:29:45 +0800 Subject: [PATCH 1/4] [Clang] Consider default template arguments when synthesizing

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/147675 >From f8b1894ad39560edb5bb0c14194a3a2d54a911ff Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 9 Jul 2025 16:29:45 +0800 Subject: [PATCH 1/3] [Clang] Consider default template arguments when synthesizing

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-11 Thread Younan Zhang via cfe-commits
@@ -1061,15 +1061,36 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef, SmallVector DeduceResults( F->getTemplateParameters()->size()); + // We don't have to deduce against the alias template specialization, + // if the source template is a synthesized alias deduction

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/147675 >From f8b1894ad39560edb5bb0c14194a3a2d54a911ff Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 9 Jul 2025 16:29:45 +0800 Subject: [PATCH 1/2] [Clang] Consider default template arguments when synthesizing

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/147675 >From f8b1894ad39560edb5bb0c14194a3a2d54a911ff Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 9 Jul 2025 16:29:45 +0800 Subject: [PATCH] [Clang] Consider default template arguments when synthesizing CTA

[clang] [PATCH 1/4] [clang] Improve nested name specifier AST representation (PR #147835)

2025-07-10 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Given the scale of the patch, it's not surprising if it undergoes some revert-reapplies cycles after the initial commit. To reduce the churn, would it be possible to ask google to test it internally before we merge? @AaronBallman https://github.com/llvm/llvm-project/pull/14783

[clang] [Clang] Fix the template argument collection after CWG2369 (PR #147894)

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

[clang] [Clang] Fix the template argument collection after CWG2369 (PR #147894)

2025-07-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/147894 >From 17e42982fc947dccfc724ee6de6cf93fa8de3222 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 10 Jul 2025 13:26:09 +0800 Subject: [PATCH 1/2] [Clang] Fix the template argument collection after CWG2369

[clang] [Clang] Fix the template argument collection after CWG2369 (PR #147894)

2025-07-09 Thread Younan Zhang via cfe-commits
@@ -1078,15 +1078,19 @@ static bool CheckFunctionConstraintsWithoutInstantiation( // template. We need the entire list, since the constraint is completely // uninstantiated at this point. - // FIXME: Add TemplateArgs through the 'Innermost' parameter once - // the refac

[clang] [Clang] Fix the template argument collection after CWG2369 (PR #147894)

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

[clang] [Clang] Fix the template argument collection after CWG2369 (PR #147894)

2025-07-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/147894 >From 17e42982fc947dccfc724ee6de6cf93fa8de3222 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 10 Jul 2025 13:26:09 +0800 Subject: [PATCH] [Clang] Fix the template argument collection after CWG2369 Since

[clang] [Clang] Fix the template argument collection after CWG2369 (PR #147894)

2025-07-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/147894 Since the function template isn't instantiated before constraint checking, we'll not be able to find the outer template arguments through function specialization when evaluating the inner constraint that is nes

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-09 Thread Younan Zhang via cfe-commits
@@ -1061,15 +1061,36 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef, SmallVector DeduceResults( F->getTemplateParameters()->size()); + // We don't have to deduce against the alias template specialization, + // if the source template is a synthesized alias deduction

[clang] [Clang] Do not skip over `RequiresExprBodyDecl` when creating lambdas (PR #147764)

2025-07-09 Thread Younan Zhang via cfe-commits
@@ -1088,6 +1088,9 @@ void CXXNameMangler::mangleNameWithAbiTags(GlobalDecl GD, return; } + while (DC->isRequiresExprBody()) +DC = DC->getParent(); zyn0217 wrote: We had a similar while loop in TransformLambdaExpr, is that still needed? Also I was

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/147675 We copy arguments from different template parameter lists depending on the deducibility of the template parameters. In particular, we may lose the default template argument from the original alias declaration,

[clang] [Clang] Fix template arguments collection for out-of-line declarations (PR #147463)

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

[clang] [Clang] Fix template arguments collection for out-of-line declarations (PR #147463)

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

[clang] [Clang] Fix template arguments collection for out-of-line declarations (PR #147463)

2025-07-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/147463 We were using the lexical DC as the starting point of template argument collection when comparing declarations. This caused an issue that template arguments from out-of-line declarations are ignored when substi

[clang] [Clang][Sema] Avoid duplicate diagnostics for incomplete types in nested name specifier (C++20+) (PR #147036)

2025-07-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Why doesn't C++20 below suffer from the issue? I think it's a waste to add a Sema scope object just for diagnostic issues. It's more like that there's an underlying issue that would be otherwise hidden by the patch. Can you explore? https://github.com/ll

[clang] [Lambda] Remove an unnecessary cast (NFC) (PR #146986)

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

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-03 Thread Younan Zhang via cfe-commits
@@ -93,6 +94,12 @@ class HeuristicResolver { // during simplification, and the operation fails if no pointer type is found. QualType simplifyType(QualType Type, const Expr *E, bool UnwrapPointer); + // Given an expression `Fn` representing the callee in a function call,

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks, this looks great Though part of me is curious about which bug was caught :) https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

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

[clang] [clang] odr-checker fix for conversion operators (PR #146153)

2025-06-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/146153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

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

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-26 Thread Younan Zhang via cfe-commits
@@ -98,7 +98,36 @@ namespace { CXXCastPath BasePath; bool IsARCUnbridgedCast; -SourceRange OpRange; +struct OpRangeType { + SourceLocation Ranges[3]; zyn0217 wrote: Renamed to Locations :) https://github.com/llvm/llvm-project/pull/145260

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/145260 >From 504c05c3a076ecafb4f11ce0703caddfac6e06d1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 23 Jun 2025 12:31:39 +0800 Subject: [PATCH 1/2] [Clang] Back out the source location workaround for CXXConst

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-06-24 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @maryammo I managed to reduce it to https://godbolt.org/z/vjcoq1qaG .. will look into it tomorrow https://github.com/llvm/llvm-project/pull/122423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

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

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

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

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/145260 >From 96f1c3bbbf7c07bf9d11bb907e3a35e196d181aa Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 23 Jun 2025 12:31:39 +0800 Subject: [PATCH] [Clang] Back out the source location workaround for CXXConstruct

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/145260 >From 504c05c3a076ecafb4f11ce0703caddfac6e06d1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 23 Jun 2025 12:31:39 +0800 Subject: [PATCH] [Clang] Back out the source location workaround for CXXConstruct

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

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

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 converted_to_draft https://github.com/llvm/llvm-project/pull/145260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/145260 >From f642a6d25a2bd3f12e6629f93152edc784bddbaa Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 23 Jun 2025 12:31:39 +0800 Subject: [PATCH] [Clang] Back out the source location workaround for CXXConstruct

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/145260 This removes the workaround introduced in 3e1a9cf3b8 and 1ba7dc38d. The issues should have been already resolved elsewhere, at least removing these lines doesn't break any existing tests. The workaround overwr

[clang] Reapply "[Clang] Profile singly-resolved UnresolvedLookupExpr with the declaration" (PR #140680)

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

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-06-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. thanks Do we also want to add some tests? https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [Clang] Support constexpr asm at global scope. (PR #143268)

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

[clang] [clang] AST: fix dependency calculation for TypedefTypes (PR #143291)

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

[clang] [Clang][RFC] Resugar attributed type alias (PR #143143)

2025-06-06 Thread Younan Zhang via cfe-commits
@@ -6998,6 +7007,31 @@ namespace { else return C.getRValueReferenceType(New); } + case Elaborated: { +auto *ET = cast(Old); +return C.getElaboratedType(ET->getKeyword(), ET->getQualifier(), + wrap(C,

[clang] [Clang][RFC] Resugar attributed type alias (PR #143143)

2025-06-06 Thread Younan Zhang via cfe-commits
@@ -6998,6 +7007,31 @@ namespace { else return C.getRValueReferenceType(New); } + case Elaborated: { +auto *ET = cast(Old); +return C.getElaboratedType(ET->getKeyword(), ET->getQualifier(), + wrap(C,

[clang] [Clang][RFC] Resugar attributed type alias (PR #143143)

2025-06-06 Thread Younan Zhang via cfe-commits
@@ -6998,6 +7007,31 @@ namespace { else return C.getRValueReferenceType(New); } + case Elaborated: { +auto *ET = cast(Old); +return C.getElaboratedType(ET->getKeyword(), ET->getQualifier(), + wrap(C,

[clang] [Clang][RFC] Resugar attributed type alias (PR #143143)

2025-06-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/143143 https://github.com/llvm/llvm-project/issues/142608 reflects a case where the type sugar on the attributed type alias is lost. It might be possible to add the sugar back at the cost of duplicating the type alia

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

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

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-06-06 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @rupprecht I sent out https://github.com/llvm/llvm-project/pull/143096 for the fix :) https://github.com/llvm/llvm-project/pull/122423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

2025-06-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/143096 >From 020160fde7a3cc13b104a5f5577a8037cf412c66 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 6 Jun 2025 17:09:08 +0800 Subject: [PATCH 1/2] [Clang] Fail the constraint substitution early after CWG2369

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

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

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

2025-06-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/143096 >From 020160fde7a3cc13b104a5f5577a8037cf412c66 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 6 Jun 2025 17:09:08 +0800 Subject: [PATCH 1/2] [Clang] Fail the constraint substitution early after CWG2369

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

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

[clang] [Clang] Fail the constraint substitution early after CWG2369 (PR #143096)

2025-06-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/143096 CWG2369 revealed another case where we were SFINAE'ing out the invalid result of substitution, but the expression now makes into evaluation. We switch to the concept specialization's context before we check it.

[clang] [Clang] Fix name lookup of conversion operators (PR #142945)

2025-06-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/142945 >From cdd6868879abf4b6c991c7f2b3e9cf9673b0570a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 5 Jun 2025 18:52:01 +0800 Subject: [PATCH 1/3] [Clang] Fix name lookup of conversion operators (TODO: Add ex

[clang] [Clang] Fix name lookup of conversion operators (PR #142945)

2025-06-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/142945 >From cdd6868879abf4b6c991c7f2b3e9cf9673b0570a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 5 Jun 2025 18:52:01 +0800 Subject: [PATCH 1/2] [Clang] Fix name lookup of conversion operators (TODO: Add ex

[clang] [Clang] Fix name lookup of conversion operators (PR #142945)

2025-06-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/142945 (TODO: Add explanation) Fixes https://github.com/llvm/llvm-project/issues/28181 Fixes https://github.com/llvm/llvm-project/issues/94052 >From cdd6868879abf4b6c991c7f2b3e9cf9673b0570a Mon Sep 17 00:00:00 2001 Fr

[clang] [Clang] Fix crash on template-specialization (PR #142338)

2025-06-03 Thread Younan Zhang via cfe-commits
@@ -5120,6 +5121,10 @@ bool Sema::addInstantiatedParametersToScope( // Simple case: not a parameter pack. assert(FParamIdx < Function->getNumParams()); ParmVarDecl *FunctionParam = Function->getParamDecl(FParamIdx); + DeclarationName name = FunctionParam-

[clang] [Clang] Improve infrastructure for libstdc++ workarounds (Reland) (PR #142592)

2025-06-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. I hope it helps! https://github.com/llvm/llvm-project/pull/142592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Reduce some AST node size. (PR #142585)

2025-06-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/142585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

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

[clang-tools-extra] Revert "[clangd] [Modules] Fixes to correctly handle module dependencies" (PR #142162)

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

[clang] [clang] member pointer class qualification fix (PR #142081)

2025-05-29 Thread Younan Zhang via cfe-commits
@@ -2127,7 +2127,7 @@ static TemplateDeductionResult DeduceTemplateArgumentsByTypeMatch( TA = S.Context.getTypeDeclType(MPA->getMostRecentCXXRecordDecl()); } else { NestedNameSpecifier *QA = MPA->getQualifier(); -TA = QualType(QA->translateToType(

[clang] [clang] member pointer class qualification fix (PR #142081)

2025-05-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/142081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an out of bound access in -verify comment parsing (PR #141940)

2025-05-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/141940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix type mismatch error when arguments to elementwise math builtin have different qualifiers, which should be well-formed (PR #141485)

2025-05-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/141485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix type mismatch error when arguments to elementwise math builtin have different qualifiers, which should be well-formed (PR #141485)

2025-05-29 Thread Younan Zhang via cfe-commits
@@ -669,6 +669,7 @@ Bug Fixes in This Version base classes. (GH139452) - Fixed an assertion failure in serialization of constexpr structs containing unions. (#GH140130) - Fixed duplicate entries in TableGen that caused the wrong attribute to be selected. (GH#140701) +- Fixe

[clang] [Sema] Fixed type missmach error when 'builtin-elementwise-math' arguments have different qualifiers, this should be a well-formed. (PR #141485)

2025-05-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @QiYueFeiXue I don't think @shafik means to directly copy his words to the PR body/title. Please at least flesh out these dotted parts and make the sentences complete, thanks. https://github.com/llvm/llvm-project/pull/141485 ___ cfe-co

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

2025-05-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick 61314076f https://github.com/llvm/llvm-project/pull/141890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

2025-05-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/141890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reset ArgPackSubstIndex before rewriting CTAD template parameters (PR #141741)

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

[clang] [Clang] Reset ArgPackSubstIndex before rewriting CTAD template parameters (PR #141741)

2025-05-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/141741 >From 4fdb0069e260e36d8cbd021536adc14f6b9ddef1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 28 May 2025 18:37:38 +0800 Subject: [PATCH 1/2] [Clang] Reset ArgPackSubstIndex before rewriting CTAD templa

[clang] [Clang] Reset ArgPackSubstIndex before rewriting CTAD template parameters (PR #141741)

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

[clang] [Clang] Reset ArgPackSubstIndex before rewriting CTAD template parameters (PR #141741)

2025-05-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/141741 032ad59 taught the instantiator to expand template argument packs for rewrite. However we might already be in a pack expansion when we synthesizing the CTAD guide, so we reset the ArgPackSubstIndex to ensure it

[clang] [llvm] Reland "Add macro to suppress -Wunnecessary-virtual-specifier" (PR #141091)

2025-05-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin can we merge it? building clang with ToT clang results in a lot of warnings now. https://github.com/llvm/llvm-project/pull/141091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

  1   2   3   4   5   6   7   8   9   10   >