[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-02 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: It would not be splitting though, it would be wholesale duplication in that case. This file is the only part of the suite still testing the old non-conformant mode, and I fail to see a test case we wouldn't be wanting to test on both.

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

[clang] 62c2959 - [clang] NFC: cxx_status mark P0522R0 as unreleased

2024-05-02 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-05-02T13:55:33-03:00 New Revision: 62c29593be317f6cfaed8ffbcc016bd2c94c35d4 URL: https://github.com/llvm/llvm-project/commit/62c29593be317f6cfaed8ffbcc016bd2c94c35d4 DIFF:

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: By the way, creduce/cvise won't help much here unless the interestingness test accounts for 'works on GCC'. Otherwise, It'd be trivial to conjure some snippet of code that works before P0522, but breaks afterward as intended. https://github.com/llvm/llvm-project/pull/89807

[clang] [Clang] Fix tests broken by #91811 (PR #91822)

2024-05-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/91822 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I am repeating myself here, but the crash happens after a bunch of errors: it's not significant, we have evidence this sort of crash is associated with error recovery. This patch implements a standard mandated breaking change, and this 'stdexec' is user code. Without evidence

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/91811 This partially reverts b86e0992bfa6c58be077d82d824016f590ac5d90. Just the default is changed back, on the Driver side. No Frontend changes. The positive spelling of the flag is undeprecated. No documentation

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @sam-mccall @bgra8 @ericniebler I believe this MR should fix your issues: https://github.com/llvm/llvm-project/pull/91833 Can you double check? You might consider applying https://github.com/llvm/llvm-project/pull/91837, since that is stacked on that and will revert the

[clang] [clang] Allow pack expansions when partial ordering against template template parameters (PR #91833)

2024-05-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/91833 When partial ordering alias templates against template template parameters, allow pack expansions when the alias has a fixed-size parameter list. These expansions were generally disallowed by proposed

[clang] [clang] Allow pack expansions when partial ordering against template template parameters (PR #91833)

2024-05-13 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/91833 >From 06b9c19a1d194240be3199d50819090b10d697b6 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 10 May 2024 23:21:22 -0300 Subject: [PATCH] [clang] Allow pack expansions when partial ordering against

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-13 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov Thank you! With that patch, clang not only doesn't crash on stdexec > with `-frelaxed-template-template-args`, but in fact accepts the code. Thanks! The crash is still there and is pre-existing, but it's a 'crash-on-invalid' issue, which is lower priority.

[clang] [clang] Allow pack expansions when partial ordering against template template parameters (PR #91833)

2024-05-13 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/91833 >From f882dca5a53a6da8ad92492f28f9eacffb34a780 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 10 May 2024 23:21:22 -0300 Subject: [PATCH] [clang] Allow pack expansions when partial ordering against

[clang] [clang] Allow pack expansions when partial ordering against template template parameters (PR #91833)

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

[clang] Revert "[clang] Revert default behavior change of P0522R0 implementation (#91811)" (PR #91837)

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

[clang] Revert "[clang] Revert default behavior change of P0522R0 implementation (#91811)" (PR #91837)

2024-05-13 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov ready_for_review https://github.com/llvm/llvm-project/pull/91837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-13 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The fix was committed, and we just reverted the revert, so default is back to `-frelaxed-template-template-args`. https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Revert "[clang] Revert default behavior change of P0522R0 implementation (#91811)" (PR #91837)

2024-05-13 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/91837 >From 1a5b4761ba804a0998faf009370d74fa486014d9 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 11 May 2024 00:42:27 -0300 Subject: [PATCH] Revert "[clang] Revert default behavior change of P0522R0

[clang] Revert "[clang] Revert default behavior change of P0522R0 implementation (#91811)" (PR #91837)

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

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-06 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Thanks, guarding the second specialization with the feature test macro works. > > > > I will try to reduce the test case tomorrow, if you still need this. > > Thanks. If it's not too much work for you, that would be great. Otherwise, I think a pretty good guess can be

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Hi, is there a way to make a compile-time check for this feature? Yes, this is exposed by a standard feature testing macro: https://en.cppreference.com/w/cpp/feature_test#cpp_template_template_args > > Looking at > Thanks for reporting this. A few questions: * Does

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Oh I see the code already includes workaround for GCC vs non-GCC. It's possible in this case you may replace the workaround with a check for the feature testing macro. But if this is a new ambiguity not covered by any of the cases I am tracking, it could still be worthwhile

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Regarding @joanahalili 's post Does it sound good for everyone that we revert the deprecation of the positive spelling of the flag for a while, until we come up with a patch for a new flag which helps ignore these deprecations?

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > I think I prefer pretty fine-grained ones TBH, it makes our deprecation > warnings more valuable. In a perfect world, it would change every release of > the compiler so that folks would be frequently reminded of it, but it isn't a > perfect world :) I meant something fine

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @joanahalili This is now merged in main: https://github.com/llvm/llvm-project/pull/92324 You can pass `-Wno-deprecated-no-relaxed-template-template-args` to disable the deprecation warning for `-fno-relaxed-template-template-args` specifically, without affecting other

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Would it be reasonable to add a > `-Wno-deprecated-relaxed-template-template-args` flag (or something like > that) for this specific deprecation? I had similar idea, but what about instead implementing something generic to ignore deprecation of any driver flag?

[clang] [clang] Create new warning group for deprecation of '-fno-relaxed-template-template-args' (PR #92324)

2024-05-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/92324 This allows the warning to be disabled in isolation, as it helps when treating them as errors. >From 8b70909746ec85483b6d7f54fec4989956fb4c21 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 15 May

[clang] [Clang] Fix some assertions not looking through type sugar (PR #92299)

2024-05-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/92299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Create new warning group for deprecation of '-fno-relaxed-template-template-args' (PR #92324)

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

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/90820 >From c4b72afa655c0e35005dca8aea18e651189f8938 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 1 May 2024 22:29:45 -0300 Subject: [PATCH] [clang] Implement provisional wording for CWG2398 regarding

[clang] [Clang][Sema] Fix last argument not being used when comparing function template specializations when one has an explicit object argument (PR #92263)

2024-05-15 Thread Matheus Izvekov via cfe-commits
@@ -5591,7 +5592,11 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( IsRValRef1); Args2.push_back(Obj2Ty); } -size_t NumComparedArguments = NumCallArguments1 + ShouldConvert1; +size_t

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/90820 >From 39e0af93163068f8de190649eccf91fda84178b6 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 1 May 2024 22:29:45 -0300 Subject: [PATCH] [clang] Implement provisional wording for CWG2398 regarding

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

[clang] 70a926c - [clang] NFC: Add a few more interesting test cases for CWG2398

2024-05-15 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-05-16T02:45:50-03:00 New Revision: 70a926cfb1d4af326be5afe6419991aeff8f44b2 URL: https://github.com/llvm/llvm-project/commit/70a926cfb1d4af326be5afe6419991aeff8f44b2 DIFF:

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: That test was merged after the last time pre-commit CI was run on this MR. The change looks like a consequence of my refactoring, we now preserve the type sugar from the injected arguments. https://github.com/llvm/llvm-project/pull/90820

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The quick fix would be to change the expectations of the test, I can do it for you. https://github.com/llvm/llvm-project/pull/90820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Weirdly enough the test passes on my machine, latest MacOS. Maybe the test is not constrained on target, and this is causing differences between machines? https://github.com/llvm/llvm-project/pull/90820 ___ cfe-commits mailing list

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Yep, I confirm the behavior happens if I add `-triple x86_64-windows-msvc` to RUN line. https://github.com/llvm/llvm-project/pull/90820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] f210152 - [clang] constrain `SemaCXX/cxx20-ctad-type-alias.cpp` target triple

2024-05-16 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-05-16T19:56:45-03:00 New Revision: f210152e5fbcec1c50ff5ccc1f6680ab2c39b46f URL: https://github.com/llvm/llvm-project/commit/f210152e5fbcec1c50ff5ccc1f6680ab2c39b46f DIFF:

[clang] fe4d5f0 - [clang] NFC: stray space cleanup

2024-05-16 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-05-16T19:56:45-03:00 New Revision: fe4d5f0d0e457a0a7dec2c7dc87996706b30a25e URL: https://github.com/llvm/llvm-project/commit/fe4d5f0d0e457a0a7dec2c7dc87996706b30a25e DIFF:

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I just pushed a fix. https://github.com/llvm/llvm-project/pull/90820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix last argument not being used when comparing function template specializations when one has an explicit object argument (PR #92263)

2024-05-16 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, thanks for the fix! https://github.com/llvm/llvm-project/pull/92263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I just double checked, the issue is present on main before this PR was merged, it's completely unrelated. https://github.com/llvm/llvm-project/pull/90820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] CTAD alias: Emit a more descriptive diagnostic message when is_deducible constraint is evaluated to false. (PR #92389)

2024-05-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I already fixed this. We just had to constrain the triple, as there are differences in size_t underlying type which affect diagnostics. https://github.com/llvm/llvm-project/pull/92389 ___ cfe-commits mailing list

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Matheus Izvekov via cfe-commits
@@ -261,6 +261,13 @@ AG ag = {1}; // CHECK: | `-BuiltinType {{.*}} 'int' // CHECK: `-ParmVarDecl {{.*}} 'int' +template +using BG = G; +BG bg(1.0); +// CHECK-LABEL: Dumping +// CHECK: FunctionTemplateDecl {{.*}} implicit +// CHECK: |-CXXDeductionGuideDecl {{.*}}

[clang] [clang] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

2024-05-07 Thread Matheus Izvekov via cfe-commits
@@ -261,6 +261,13 @@ AG ag = {1}; // CHECK: | `-BuiltinType {{.*}} 'int' // CHECK: `-ParmVarDecl {{.*}} 'int' +template +using BG = G; +BG bg(1.0); +// CHECK-LABEL: Dumping +// CHECK: FunctionTemplateDecl {{.*}} implicit +// CHECK: |-CXXDeductionGuideDecl {{.*}}

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

2024-05-21 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @erichkeane this is kind of the same as https://github.com/llvm/llvm-project/pull/92854, but for NTTP instead of type-parameters. https://github.com/llvm/llvm-project/pull/92852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-19 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Was there ever an RFC on this whole 'splitting up Sema' project? I have my own reservations as well. I think starting up from the easier bits is a risky proposition, as we might realize this whole thing will fail when we get to the harder parts. I also think this can lead in

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-19 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/92318 ___ 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] Diagnose current instantiation used as an incomplete base class (PR #92597)

2024-05-19 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. The change itself looks pretty good, but note that GCC only warns about this, and more importantly MSVC still accepts the code without complaint. So this means that we could find out from user feedback that we will need to keep the old

[clang] [clang] fix printing of canonical template template parameters (PR #93124)

2024-05-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/93124 When printing template arguments of the template kind, a canonical template template parameter would be printed as an empty string. This fixes it so they are printed similarly to canonical template type

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-22 Thread Matheus Izvekov via cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema , OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ?

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-22 Thread Matheus Izvekov via cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema , OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ?

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #92855)

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

[clang] [clang] fix printing of canonical template template parameters (PR #93124)

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

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-23 Thread Matheus Izvekov via cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema , OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ?

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

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

[clang] [clang] Avoid crash due to unimplemented StructuralValue support in the template differ (PR #93265)

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

[clang] [clang] add fallback to expr in the template differ when comparing ValueDecl (PR #93266)

2024-05-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93266 >From 5b592204ddef177d612f8455f4e14ab9cf9c06bd Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 23 May 2024 23:57:01 -0300 Subject: [PATCH] [clang] add fallback to expr in the template differ when

[clang] [clang] add fallback to expr in the template differ when comparing ValueDecl (PR #93266)

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

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Can you also add a test based on my example? With also a variant on that in which the bad conversion happens on the last element of the pack, instead of the last parameter. Lastly, please namespace the tests with the name of, or add a

[clang] [clang] Avoid crash due to unimplemented StructuralValue support in the template differ (PR #93265)

2024-05-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93265 >From 2546c2c5d9e1bc6d1d4ddd818b4017073f17cec0 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 23 May 2024 21:23:21 -0300 Subject: [PATCH] [clang] Avoid crash due to unimplemented StructuralValue

[clang] [clang] Avoid crash due to unimplemented StructuralValue support in the template differ (PR #93265)

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

[clang] [clang] add fallback to expr in the template differ when comparing ValueDecl (PR #93266)

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

[clang] [clang] Avoid crash due to unimplemented StructuralValue support in the template differ (PR #93265)

2024-05-24 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: We usually create new tests under the latest standard. https://github.com/llvm/llvm-project/pull/93265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-24 Thread Matheus Izvekov via cfe-commits
@@ -11298,8 +11298,9 @@ static void DiagnoseBadConversion(Sema , OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ?

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

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

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const TemplateArgument &) { void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) { OS << " type"; - dumpType(TA.getAsType()); + dumpTemplateArgument(TA); } void

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93431 >From f9892ebed002d73c74f44629e926386006f7bec1 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 24 May 2024 12:22:55 -0300 Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via cfe-commits
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) { }); } +void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) { + llvm::SmallString<128> Str; + { +llvm::raw_svector_ostream SS(Str); +TA.print(PrintPolicy, SS,

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93431 >From 86e3852d0501bd24738c094359799c72781ad808 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 24 May 2024 12:22:55 -0300 Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument

[clang] 0f85b25 - [clang] NFC: add a test case for TemplateName canonical type print issue

2024-05-27 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-05-27T04:45:20-03:00 New Revision: 0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7 URL: https://github.com/llvm/llvm-project/commit/0f85b25f51a3e06c48b3fe8042a3de1cf0e635d7 DIFF:

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-27 Thread Matheus Izvekov via cfe-commits
@@ -947,6 +947,26 @@ void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) { }); } +void TextNodeDumper::dumpTemplateArgument(const TemplateArgument ) { + llvm::SmallString<128> Str; + { +llvm::raw_svector_ostream SS(Str); +TA.print(PrintPolicy, SS,

[clang] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-05-24 Thread Matheus Izvekov via cfe-commits
@@ -55,15 +55,21 @@ namespace PR11856 { template T *end(T*); - class X { }; + struct X { }; + struct Y { +int end; + }; template void Foo2() { T it1; -if (it1->end < it1->end) { -} +if (it1->end < it1->end) { } X *x; -if (x->end <

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: No problem! It looks like this example is salvageable, nothing is stopping us from just applying the same rules when deducing a template template parameter against other kinds of templates. This shouldn't stop you from cleaning up the code, whatever rules we come up here are

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

2024-05-20 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Can you try to explain the what the patch does more and describe the > rationale? Done. https://github.com/llvm/llvm-project/pull/92852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

2024-05-20 Thread Matheus Izvekov via cfe-commits
@@ -1435,7 +1436,10 @@ class NonTypeTemplateParmDecl final bool hasDefaultArgument() const { return DefaultArgument.isSet(); } /// Retrieve the default argument, if any. - Expr *getDefaultArgument() const { return DefaultArgument.get(); } + const TemplateArgumentLoc ()

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

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

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

2024-05-20 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/92852 This is an enabler for a future patch. >From 22964061e46ef0d37904f6c8e757dca9800c5cd0 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 20 May 2024 00:39:55 -0300 Subject: [PATCH] [clang] NFCI: use

[clang] 4cebe5a - [clang] NFC: add test for cwg2398 ambiguity issue

2024-05-20 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-05-20T22:49:53-03:00 New Revision: 4cebe5a43ba83eab477358ef4da665b43463bb68 URL: https://github.com/llvm/llvm-project/commit/4cebe5a43ba83eab477358ef4da665b43463bb68 DIFF:

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: One suggestion, if you are going to go about this problem systematically, try to tackle the hardest problems first. For example: Try to make `MultiLevelTemplateArgumentList` const correct. I would like other suggestions as well. https://github.com/llvm/llvm-project/pull/93493

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Errr, not certain I agree with this -- that basically is "admit defeat and > stop aiming for const correctness." Well, I am saying, add const to places we are pretty sure we will never change, and leave const out when in doubt. Don't add const just because we don't need

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > `const_cast` here is a relatively recent addition, and I checked out with > @erichkeane that the use case (pack expansion) is legit. According to the > approach you're suggesting, the one who wrote this `const_cast` should > instead refactor the MLTAL to use

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-28 Thread Matheus Izvekov via cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const TemplateArgument &) { void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) { OS << " type"; - dumpType(TA.getAsType()); + dumpTemplateArgument(TA); } void

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

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

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov - can you please take a look at https://godbolt.org/z/ahro3vnPd ? > The reduced example fails somewhat differently, but it complains on `implicit > instantiation of undefined template` _with_ relaxed argument matching enabled > and compiles OK without... Thank you,

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-05-28 Thread Matheus Izvekov via cfe-commits
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema , FunctionTemplateDecl *F, for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) { const auto = DeduceResults[Index]; -if (D.isNull()) +if (D.isNull()) { // non-deduced template parameters of f +

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-05-28 Thread Matheus Izvekov via cfe-commits
@@ -2840,8 +2841,22 @@ buildAssociatedConstraints(Sema , FunctionTemplateDecl *F, for (unsigned Index = 0; Index < DeduceResults.size(); ++Index) { const auto = DeduceResults[Index]; -if (D.isNull()) +if (D.isNull()) { // non-deduced template parameters of f +

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-05-28 Thread Matheus Izvekov via cfe-commits
@@ -2882,7 +2899,8 @@ buildAssociatedConstraints(Sema , FunctionTemplateDecl *F, // We add the outer template arguments which is [int] to the multi-level arg // list to ensure that the occurrence U in `C` will be replaced with int // during the substitution. - if

[clang] [clang] CTAD alias: fix transformation for require-clause expr Part2. (PR #93533)

2024-05-28 Thread Matheus Izvekov via cfe-commits
@@ -3100,6 +3118,7 @@ BuildDeductionGuideForTypeAlias(Sema , Context.getInjectedTemplateArg(NewParam)); TransformedDeducedAliasArgs[AliasTemplateParamIdx] = NewTemplateArgument; } + unsigned UndeducedTemplateParameterStartIndex = FPrimeTemplateParams.size();

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > That's the opposite of my view. Mutation needs to be justified. "What if we > need it later" can be used to justify anything, and if we do need it later > then we change the code then. Until that point, readers can see `const` and > know that things aren't being changed out

[clang] [libcxx] [clang] Preserve Qualifiers and type sugar in TemplateNames (PR #93433)

2024-05-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Could you please take another look? Sure, but let's take the discussion to the other PR. https://github.com/llvm/llvm-project/pull/93433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Use correct TemplateName when transforming TemplateSpecializationType (PR #93411)

2024-05-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: So After we have formed a TemplateSpecializationType, we are done with the NNS. We keep it around in an ElaboratedType for type sugar only, it should not be needed to compile the program correctly anymore. So I think this solution violates one important

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93431 >From fabcce0d7a4a1633b4d5ed49cb78fdf441e3c11e Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 24 May 2024 12:22:55 -0300 Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Matheus Izvekov via cfe-commits
@@ -3833,6 +3833,14 @@ def note_cannot_use_trivial_abi_reason : Note< "it is polymorphic|" "it has a base of a non-trivial class type|it has a virtual base|" "it has a __weak field|it has a field of a non-trivial class type}1">; +def err_ppc_impossible_musttail: Error< +

<    1   2   3   4   5   6   >