[clang] [clang] implement common-sugar for adjusted member-pointers (PR #133613)

2025-04-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/133613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-05 Thread Matheus Izvekov via cfe-commits
@@ -16439,33 +16735,70 @@ CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) { return true; auto *MD = dyn_cast(FnDecl); + auto ConstructDestroyingDeleteAddressType = [&]() { +assert(MD); +return SemaRef.Context.getCanonicalType(SemaRef.Context

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-05 Thread Matheus Izvekov via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-04-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/132626 This reverts an earlier attempt (adb0d8ddceb143749c519d14b8b31b481071da77 and 50e5411e4247421fd606f0a206682fcdf0303ae3) to support these expansions, which was limited to type arguments and which subverted the p

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: We can do a back port once the patch is settled, and it could wait until 20.2. https://github.com/llvm/llvm-project/pull/134461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134461 >From 9411de369476b24d56fbd495bcf4c76def2c4fe1 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 31 Mar 2025 17:19:18 -0300 Subject: [PATCH] [clang] fix partial ordering of NTTP packs This fixes partia

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132234)

2025-04-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Yeah, clang side unchanged. The lldb changed stuff is trivial, I don't think it's worth waiting a long time for lldb input. https://github.com/llvm/llvm-project/pull/132234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-05 Thread Matheus Izvekov via cfe-commits
@@ -6837,64 +6846,55 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, assert(!ParamType.hasQualifiers() && "non-type template parameter type cannot be qualified"); + // If either the parameter has a dependent type or the argument is + //

[clang] [clang] ASTContext: flesh out implementation of getCommonNNS (PR #131964)

2025-04-05 Thread Matheus Izvekov via cfe-commits
@@ -13462,13 +13462,114 @@ static ElaboratedTypeKeyword getCommonTypeKeyword(const T *X, const T *Y) { : ElaboratedTypeKeyword::None; } +static NestedNameSpecifier *getCommonNNS(ASTContext &Ctx, +

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-05 Thread Matheus Izvekov via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-04-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/132626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not create dependent CallExpr having UnresolvedLookupExpr inside non-dependent context (PR #124609)

2025-04-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Clang does crash with one of the included test cases, if you try to actually use the function: https://godbolt.org/z/e6e6Ehjoj My reading is that using a static function with placeholder type before it has been deduced is ill-formed, per https://eel.is/c++draft/dcl.spec.auto#ge

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @fmayer this patch touches nowhere near where those backtraces indicate. https://github.com/llvm/llvm-project/pull/130182 is a far more likely culprit. https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-co

[clang] [CLANG-CL] ignores wpadded (PR #130182)

2025-04-05 Thread Matheus Izvekov via cfe-commits
=?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes Message-ID: In-Reply-To: mizvekov wrote:

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @thurstond Well can you provide a more recent buildbot failure link where https://github.com/llvm/llvm-project/pull/130182 is not on the list of possible culpirits? Because the link @fmayer provided for sure included it. https://github.com/llvm/llvm-project/pull/132748

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-04 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/134461 This fixes partial ordering of pack expansions of NTTPs, by procedding with the check using the pattern of the NTTP through the rules of the non-pack case. This also unifies almost all of the different version

[clang] [clang] fix crash with ADL for member pointers with dependent class (PR #132977)

2025-03-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: You mean crashes caused by this fix, or do you mean crashes not fixed by it? In any case, I won't be available to revert anything until tomorrow. You can go ahead and revert, but I am afraid it won't be straightforward. https://github.com/llvm/llvm-project/pull/132317 _

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: If you do revert, please avoid reverting tests if possible. https://github.com/llvm/llvm-project/pull/132317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix crash with ADL for member pointers with dependent class (PR #132977)

2025-03-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/132977 Fix crash when looking up associated namespaces for member pointers with an unknown class, due to dependency. It was a regression introduced in https://github.com/llvm/llvm-project/pull/131965 and reported he

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @alexfh thanks, this will be fixed here: https://github.com/llvm/llvm-project/pull/132977 https://github.com/llvm/llvm-project/pull/132317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] fix crash with ADL for member pointers with dependent class (PR #132977)

2025-03-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Since this fixes a regression recently introduced, which was picked up by upstream users, I will land this as soon as pre-commit checks are done. https://github.com/llvm/llvm-project/pull/132977 ___ cfe-commits mailing list cfe-commits

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133113 >From 322838fdee8b751582e90d34b367d7877ee1dbf7 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 12:26:40 -0300 Subject: [PATCH] [clang] fix deduction of member pointers with dependent named

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133113 >From d1831e84e62f5a100de193619cbfdf9a1d403674 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 12:26:40 -0300 Subject: [PATCH] [clang] fix deduction of member pointers with dependent named

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/133113 This fixes a regression when interpreting a nested name specifier for deduction purposes in member pointers. This introduces a helper for fully translating a nested name specifier into a type. Other existing

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-26 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @alexfh @rupprecht thanks, that was indeed a separate regression, and this will be fixed here: https://github.com/llvm/llvm-project/pull/133113 https://github.com/llvm/llvm-project/pull/132317 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-26 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks, this will be fixed here: https://github.com/llvm/llvm-project/pull/133113 https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/133113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133113 >From 839a8fc708bad03c3c82a1916d70652ab3b17b5e Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 12:26:40 -0300 Subject: [PATCH] [clang] fix deduction of member pointers with dependent named

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-26 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @alexfh Are you sure the original crashes were due to https://github.com/llvm/llvm-project/pull/132977 ? Looking at the patch, it seems unlikely it could cause a crash in itself. What I think happened is that your compilation proceeded further along and encountered the other c

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-26 Thread Matheus Izvekov via cfe-commits
@@ -1650,6 +1665,23 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +std::optional ComputeSizeOfPackExprWithoutSubstitution( +ArrayRef PackArgs) { + // Don't do this when rewriting template parameters for CTAD: +

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133113 >From d1831e84e62f5a100de193619cbfdf9a1d403674 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 12:26:40 -0300 Subject: [PATCH 1/2] [clang] fix deduction of member pointers with dependent

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-03-26 Thread Matheus Izvekov via cfe-commits
@@ -70,7 +70,14 @@ struct alignas(ConstraintAlignment) AtomicConstraint { // We do not actually substitute the parameter mappings into the // constraint expressions, therefore the constraint expressions are // the originals, and comparing them will suffice. -if

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Note this was unrelated to another regression, as reported here: https://github.com/llvm/llvm-project/pull/132317#issuecomment-2755417893 Since this fixes a regression which recently landed, I am going to go ahead and merge, relying on post-commit review. https://github.com/ll

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/133113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-03-26 Thread Matheus Izvekov via cfe-commits
@@ -70,7 +70,14 @@ struct alignas(ConstraintAlignment) AtomicConstraint { // We do not actually substitute the parameter mappings into the // constraint expressions, therefore the constraint expressions are // the originals, and comparing them will suffice. -if

[clang] [RFC][clang] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-03-26 Thread Matheus Izvekov via cfe-commits
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl( // Friend function defined withing class template may stop being function // definition during AST merges from different modules, in this case decl // with function body should be used for instantiat

[clang] [clang] fix structural comparison dependent class member pointer (PR #133343)

2025-03-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/133343 Fixes a regression introduced in https://github.com/llvm/llvm-project/pull/130537 and reported here https://github.com/llvm/llvm-project/issues/133144 This fixes a crash in ASTStructuralEquivalence where the

[clang] [clang] fix structural comparison for dependent class member pointer (PR #133343)

2025-03-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/133343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135119 This changes the TemplateArgument representation to hold a flag indicating whether a template argument of expression type is supposed to be canonical or not. This gets one step closer to solving https://gith

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135119 >From 03801aef9b4f950940d33276095c14047da0a3e6 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 17 Sep 2022 18:07:28 +0200 Subject: [PATCH] [clang] Improved canonicalization for template specialization

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/135111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -143,8 +143,8 @@ def note_constexpr_null_subobject : Note< "access array element of|perform pointer arithmetic on|" "access real component of|" "access imaginary component of}0 null pointer">; -def note_constexpr_null_callee : Note< - "'%0' evaluates to a null functio

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-10 Thread Matheus Izvekov via cfe-commits
@@ -168,6 +168,8 @@ class TemplateArgument { LLVM_PREFERRED_TYPE(bool) unsigned IsDefaulted : 1; uintptr_t V; +LLVM_PREFERRED_TYPE(bool) +unsigned IsCanonicalExpr : 1; mizvekov wrote: Yeah sure. Though it's not going to make a difference in

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-10 Thread Matheus Izvekov via cfe-commits
@@ -3250,8 +3251,7 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, TemplateArgument NumArgsArg = Converted[2]; if (NumArgsArg.isDependent()) - return Context.getCanonicalTemplateSpecializationType(TemplateName(BTD), -

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135119 >From ee7360df51bdc8b0f9e9582d9cfa5ecd36a6df1d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 17 Sep 2022 18:07:28 +0200 Subject: [PATCH] [clang] Improved canonicalization for template specialization

[clang] [clang-tools-extra] [libcxx] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-08 Thread Matheus Izvekov via cfe-commits
@@ -7379,6 +7379,14 @@ class RecoveryExpr final : public Expr, friend class ASTStmtWriter; }; +/// Insertion operator for diagnostics. This allows sending +/// Expr into a diagnostic with <<. +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, +

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-08 Thread Matheus Izvekov via cfe-commits
@@ -11683,7 +11683,10 @@ static void DiagnoseIntInBoolContext(Sema &S, Expr *E) { S.Diag(ExprLoc, diag::warn_left_shift_always) << (Result.Val.getInt() != 0); else if (E->getType()->isSignedIntegerType()) -S.Diag(ExprLoc, diag::warn_left_shift

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-08 Thread Matheus Izvekov via cfe-commits
@@ -1144,20 +1144,25 @@ FormatDiagnostic(const char *DiagStr, const char *DiagEnd, switch (Kind) { // STRINGS -case DiagnosticsEngine::ak_std_string: { - const std::string &S = getArgStdStr(ArgNo); - assert(ModifierLen == 0 && "No modifiers for

[clang] [clang-tools-extra] [libcxx] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-08 Thread Matheus Izvekov via cfe-commits
@@ -7379,6 +7379,14 @@ class RecoveryExpr final : public Expr, friend class ASTStmtWriter; }; +/// Insertion operator for diagnostics. This allows sending +/// Expr into a diagnostic with <<. +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, +

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I agree that if we can't guarantee it will be tail-called, this must be an error. must_tail is not an optimization. In fact, LLVM by itself will already perform tail call optimizations, and remove them when it would not be profitable in terms of execution cost. The point of m

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/135067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135067 A NestedNameSpecifier of TypeSpec kind can be non-dependent even if its prefix is dependent, when for example the prefix is an injected class type but the type itself is a simple alias to a non-dependent type.

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @alexfh the last one will be fixed here: https://github.com/llvm/llvm-project/pull/135067 https://github.com/llvm/llvm-project/pull/133610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/135067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @slackito this will be fixed here: https://github.com/llvm/llvm-project/pull/135111 https://github.com/llvm/llvm-project/pull/133610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/135111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135111 This fixes a regression introduced in https://github.com/llvm/llvm-project/pull/133610#issuecomment-2787332042 which was reported here https://github.com/llvm/llvm-project/pull/133610#issuecomment-2787332042

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @pranavk this test case is fixed by the same fix as for the first mangling issue: https://github.com/llvm/llvm-project/pull/135111 https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -690,6 +690,23 @@ SmallVector TemplateParamsReferencedInTemplateArgumentList( SemaRef.MarkUsedTemplateParameters( DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams); + auto MarkDefaultArgs = [&](auto *Param) { +if (!Param || !Param->hasDefa

[clang] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -690,6 +690,23 @@ SmallVector TemplateParamsReferencedInTemplateArgumentList( SemaRef.MarkUsedTemplateParameters( DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams); + auto MarkDefaultArgs = [&](auto *Param) { +if (!Param || !Param->hasDefa

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -18,19 +18,19 @@ int D = 1; #pragma data_seg(".data") int a = 1; extern const Mutable mutable_custom_section; -const Mutable mutable_custom_section; // expected-warning {{`#pragma const_seg` for section ".my_const" will not apply to 'mutable_custom_section' due to the pres

[clang] [clang-tools-extra] [clang] Improved canonicalization for template specialization types (PR #135119)

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/135119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] implement printing of canonical template arguments of expression kind (PR #135133)

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/135133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/134461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] implement printing of canonical template arguments of expression kind (PR #135133)

2025-04-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135133 >From e5422e4b48b64e695f5ae8c7502370db1be84d50 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 10 Apr 2025 02:52:36 -0300 Subject: [PATCH] [clang] implement printing of canonical template arguments of

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-03-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/132626 >From 471bef0599a56ee90c1f8e2f7505a7b0003433c2 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 22 Mar 2025 17:29:16 -0300 Subject: [PATCH 1/3] Revert "[Clang] Distinguish expanding-pack-in-place cases

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -9817,27 +9817,54 @@ def err_operator_new_delete_invalid_result_type : Error< def err_operator_new_delete_dependent_result_type : Error< "%0 cannot have a dependent return type; use %1 instead">; def err_operator_new_delete_too_few_parameters : Error< - "%0 must have at l

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > > @alexfh should be fixed by #133613 > > > > Thank you! The crash is resolved. Do you still need a reduced test case? No worries, the tests included in PR already reproduce it. https://github.com/llvm/llvm-project/pull/132401 ___

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -7353,6 +7354,69 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { else if (Record->hasAttr()) checkCUDADeviceBuiltinTextureClassTemplate(*this, Record); } + + llvm::SmallVector TypeAwareNewDecls; + llvm::SmallVector TypeAwareDeleteDecls;

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-31 Thread Matheus Izvekov via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-04-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/132626 >From bbd2a588f79926323a29a3a70f061e4a2433bdc2 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 22 Mar 2025 17:29:16 -0300 Subject: [PATCH 1/3] Revert "[Clang] Distinguish expanding-pack-in-place cases

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/132748 >From b50ea7d744280bdfb97f0abaeb10d088d502e81a Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 22 Mar 2025 16:03:04 -0300 Subject: [PATCH 1/4] [clang] Track final substitution for SubstTemplateTempla

[clang] 2f25345 - [clang] fix missing initialization msan failure

2025-04-01 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-04-01T21:06:38-03:00 New Revision: 2f25345670081f1ca460ea3f42a0585ef3f1e877 URL: https://github.com/llvm/llvm-project/commit/2f25345670081f1ca460ea3f42a0585ef3f1e877 DIFF: https://github.com/llvm/llvm-project/commit/2f25345670081f1ca460ea3f42a0585ef3f1e877.dif

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-04-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] support pack expansions for trailing requires clauses (PR #133190)

2025-04-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/133190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] support pack expansions for trailing requires clauses (PR #133190)

2025-04-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133190 >From 4c3fe79695f8082f56f8403fbf1f9eb299bb4af2 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 18:38:34 -0300 Subject: [PATCH] [clang] support pack expansions for trailing requires clauses

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-04-01 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @rnk FYI this was reverted https://github.com/llvm/llvm-project/pull/133545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-04-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, thanks for working on this. Please add a release note before merging. https://github.com/llvm/llvm-project/pull/133806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2025-03-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Noted. Sorry I haven't responded yet, I have other priorities and it might take a while before I get back to this patch. https://github.com/llvm/llvm-project/pull/107942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Regarding the double const , I think this is not a type printer bug per se. By indiscriminately adding a qualifier to a type, we can produce a type which cannot be written, such as this const qualified array case. As such, we can never do a good job printing these anyway. Ther

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The test for this should actually go in `clang/test/SemaCXX/sugar-common-types.cpp`, following the style in the file. One example test, without using constexpr: https://godbolt.org/z/8PGa4aTPx ```C++ enum class Z {}; using ConstInt = const int; using ConstIntArray1 = ConstInt[1

[clang] 11fdea9 - [clang] NFC: remove trailing whitespaces from clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp

2025-04-08 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-04-08T15:10:33-03:00 New Revision: 11fdea984dc6777ba4f4b7e516c2938083b34ddb URL: https://github.com/llvm/llvm-project/commit/11fdea984dc6777ba4f4b7e516c2938083b34ddb DIFF: https://github.com/llvm/llvm-project/commit/11fdea984dc6777ba4f4b7e516c2938083b34ddb.dif

[clang] [clang-tools-extra] [libcxx] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-08 Thread Matheus Izvekov via cfe-commits
@@ -7379,6 +7379,14 @@ class RecoveryExpr final : public Expr, friend class ASTStmtWriter; }; +/// Insertion operator for diagnostics. This allows sending +/// Expr into a diagnostic with <<. +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, +

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-08 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Ack, I see. I will try to reduce this example further. It's not likely I will have a solution in less than 2 hours this time due to personal commitments, so feel free to revert if this is blocking you. In any case I will pick this up tomorrow. https://github.com/llvm/llvm-proj

[clang] [clang-tools-extra] [libcxx] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-08 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134693 >From 302fc36812e5ddcbf856732d65ba7516e05ca1e3 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 7 Apr 2025 13:08:52 -0300 Subject: [PATCH] [clang] fix diagnostic printing of expressions ignoring LangO

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-06 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/134560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6ce0fd7 - [clang] NFC: clean trailing whitespaces in clang/test/CXX/drs/cwg15xx.cpp

2025-04-06 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-04-06T23:42:27-03:00 New Revision: 6ce0fd7f74502a75120bef43f12f56e3a5d80dfd URL: https://github.com/llvm/llvm-project/commit/6ce0fd7f74502a75120bef43f12f56e3a5d80dfd DIFF: https://github.com/llvm/llvm-project/commit/6ce0fd7f74502a75120bef43f12f56e3a5d80dfd.dif

[clang] [clang] ItaniumMangle: fix mangling for unresolved types (PR #135312)

2025-04-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/135312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-11 Thread Matheus Izvekov via cfe-commits
@@ -690,6 +690,23 @@ SmallVector TemplateParamsReferencedInTemplateArgumentList( SemaRef.MarkUsedTemplateParameters( DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams); + auto MarkDefaultArgs = [&](auto *Param) { +if (!Param || !Param->hasDefa

[clang] [clang-tools-extra] [clang] implement printing of canonical template arguments of expression kind (PR #135133)

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Sure, but I'd have to resist the urge to fix them, so that they can end up as test cases. They probably wouldn't survive long either way. For example, I grepped the source tree for diagnostics where we are emitting 'type-parameter-X-X', and where this is happening not because t

[clang] [clang-tools-extra] [llvm] Reland: [clang] Improved canonicalization for template specialization types (PR #135414)

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Adding lldb back to the ci script, as otherwise lldb cannot be tested locally. https://github.com/llvm/llvm-project/pull/135414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang-tools-extra] [llvm] Reland: [clang] Improved canonicalization for template specialization types (PR #135414)

2025-04-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135414 This changes the TemplateArgument representation to hold a flag indicating whether a tempalte argument of expression type is supposed to be canonical or not. This gets one step closer to solving https://gith

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Yeah I see, so this was actually missed previously in another node, `SubstNonTypeTemplateParmPackExpr`, which during substitution propagates this flag to `SubstNonTypeTemplateParmExpr`. https://github.com/llvm/llvm-project/pull/134560 ___

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: It's possible but it's not too closely related. I will post a patch for this one soon, and then we can try again that one and I will take a fresh look on the serialization code. https://github.com/llvm/llvm-project/pull/134560 ___ cfe

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: This will be fixed here: https://github.com/llvm/llvm-project/pull/135428 https://github.com/llvm/llvm-project/pull/134560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

<    8   9   10   11   12   13   14   15   16   17   >