[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] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

2024-05-03 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] CTAD: fix the aggregate deduction guide for alias templates. (PR #90894)

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

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

2024-05-03 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 {{.*}} 'a

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

2024-05-03 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. This looks like a straightforward fix to me as well LGTM https://github.com/llvm/llvm-project/pull/90894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[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] 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 {{.*}} 'a

[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 {{.*}} 'a

[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 https:/

[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 to

[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 mad

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

2024-05-08 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Here's a preprocessed file: > [repro.zip](https://github.com/llvm/llvm-project/files/15250584/repro.zip) > > I tried to reduce, and got rid of most of the test code and some of the > stdexec code, but there's still a lot left. I hit the end of my timebox on > that. Maybe cre

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

2024-05-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov I have a [reduced test > case](https://github.com/llvm/llvm-project/files/15261978/repro.zip) for the > crash @sam-mccall reported. > > Clang does not crash before but crashes at this revision. Thanks. I confirm it crashes, but it crashes on clang 18.1.4 as well, i

[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] 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] 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 ch

[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] 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 resolutio

[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 default

[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. https://

[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 t

[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 t

[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 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 imp

[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] 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] 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 https://lists.llv

[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] 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? https://gith

[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? https://github.com/llvm/llvm-project/pull/89807

[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 gr

[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 20

[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] 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 warnings

[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 pa

[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][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 NumComparedArguments

[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: https://github.com/llvm/llvm-project/commit/70a926cfb1d4af326be5afe6419991aeff8f44b2.dif

[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 pa

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo

[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 cf

[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 https://lists.llvm.org/cgi-bin/mailman/list

[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: https://github.com/llvm/llvm-project/commit/f210152e5fbcec1c50ff5ccc1f6680ab2c39b46f.dif

[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: https://github.com/llvm/llvm-project/commit/fe4d5f0d0e457a0a7dec2c7dc87996706b30a25e.dif

[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 https://lists.llvm.org/cg

[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 cfe-commits@lists.llvm

[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] 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 t

[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 be

[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] 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: https://github.com/llvm/llvm-project/commit/4cebe5a43ba83eab477358ef4da665b43463bb68.dif

[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 Temp

[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
@@ -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 &get

[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 https://lists.llvm.org/cgi-bin/mailman/l

[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-tools-extra] [clang] NFCI: use TemplateArgumentLoc for type-param DefaultArgument (PR #92854)

2024-05-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/92854 ___ 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 type-param DefaultArgument (PR #92854)

2024-05-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/92854 >From 142c3f394e1b34dcefcaf0887a6fd4711b78eeb3 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 20 May 2024 16:30:46 -0300 Subject: [PATCH] [clang] NFCI: use TemplateArgumentLoc for type-param DefaultA

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for type-param DefaultArgument (PR #92854)

2024-05-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/92854 ___ 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 CWG2398 provisional TTP matching to class templates (PR #92855)

2024-05-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited 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-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

2024-05-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/92852 >From 984ac614f6d6e3196961690fa957df6a03f37782 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 20 May 2024 00:39:55 -0300 Subject: [PATCH] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgumen

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

2024-05-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/92852 >From 229cb63b95bb3b0db8d73947a40dede945b8b378 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 20 May 2024 00:39:55 -0300 Subject: [PATCH] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgumen

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

2024-05-21 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] Implement resolution for CWG1835 (PR #92957)

2024-05-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: I think overall this looks like the right direction to me. https://github.com/llvm/llvm-project/pull/92957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

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

2024-05-21 Thread Matheus Izvekov via cfe-commits
@@ -47,8 +47,8 @@ template void DerivedT::Inner() { Derived1T::Foo(); Derived2T::Member = 42; - this->Derived1T::Foo(); - this->Derived2T::Member = 42; + this->Derived1T::Foo(); // expected-error{{use 'template' keyword to treat 'Derived1T' as a dependent template name}

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

2024-05-21 Thread Matheus Izvekov via cfe-commits
@@ -6891,7 +6891,7 @@ class Sema final : public SemaBase { const TemplateArgumentListInfo *TemplateArgs); ExprResult ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, - tok::TokenKind OpKind, CXXScopeSpec &SS, +

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

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

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

2024-05-21 Thread Matheus Izvekov via cfe-commits
@@ -720,7 +720,7 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } CXXScopeSpec SS; -if (ParseOptionalCXXScopeSpecifier(SS, /*ParsedType=*/nullptr, +if (ParseOptionalCXXScopeSpecifier(SS, /*ObjectType=*/nullptr, mi

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

2024-05-21 Thread Matheus Izvekov via cfe-commits
@@ -397,22 +397,32 @@ NamedDecl *Sema::FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS) { while (NNS->getPrefix()) NNS = NNS->getPrefix(); - if (NNS->getKind() != NestedNameSpecifier::Identifier) -return nullptr; - - LookupResult Found(*this, NNS->get

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

2024-05-21 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] Implement resolution for CWG1835 (PR #92957)

2024-05-21 Thread Matheus Izvekov via cfe-commits
@@ -2893,6 +2893,8 @@ class TreeTransform { CXXScopeSpec SS; SS.Adopt(QualifierLoc); +if (FirstQualifierInScope) + SS.setFoundFirstQualifierInScope(FirstQualifierInScope); mizvekov wrote: It looks like adding 'FirstQualifierInScope' as a prop

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

2024-05-21 Thread Matheus Izvekov via cfe-commits
@@ -618,7 +618,6 @@ namespace cwg141 { // cwg141: 3.1 // FIXME: we issue a useful diagnostic first, then some bogus ones. mizvekov wrote: It looks like this FIXME is fixed as per change below. https://github.com/llvm/llvm-project/pull/92957

[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 edited 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-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

2024-05-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed 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][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 &S, OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ? Fn->ge

[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 &S, OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ? Fn->ge

[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-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 parame

[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 &S, OverloadCandidate *Cand, Expr *FromExpr = Conv.Bad.FromExpr; QualType FromTy = Conv.Bad.getFromType(); QualType ToTy = Conv.Bad.getToType(); - SourceRange ToParamRange = - !isObjectArgument ? Fn->ge

[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-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #92855)

2024-05-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks for the heads up, this does look like a problem. I am reverting it for now. 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/

[clang] Revert "[clang] Implement CWG2398 provisional TTP matching to class templates" (PR #93258)

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/93258 Reverts llvm/llvm-project#92855 This is causing issues, there are still being reduced, but does look like a problem. >From 8871ef58ece10234b8cd97c5e7199dee7d7a8b08 Mon Sep 17 00:00:00 2001 From: Matheus Izveko

[clang] Revert "[clang] Implement CWG2398 provisional TTP matching to class templates" (PR #93258)

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/93258 ___ 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 CWG2398 provisional TTP matching to class templates (PR #92855)

2024-05-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Heads up: this commit has triggered some weird errors for a compile, but only > when clang header modules are enabled. > That seems to _probably_ indicate a bug in this commit (presumably related to > AST serialization or deserialization?), but I don't have a test-case, and,

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

2024-05-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I figured a reproducer based on your hints: ```C++ template struct A {}; template class TT> auto f(TT a) { return a; } A v1; A v2; using X = decltype(f(v1)); using Y = decltype(f(v2)); ``` Fails with: ``` t.cc:9:20: error: no matching function for call to 'f' 9 | using Y

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

2024-05-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/93265 This was not implemented in https://github.com/llvm/llvm-project/pull/78041 when StructuralValue TemplateArguments were originally added. This patch does not implement this functionality, it just falls back to

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-05-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: This missed adding support to StructuralValue template arguments to the template differ. See https://github.com/llvm/llvm-project/pull/93265 Te support is still missing, we are just avoiding the crash for now. https://github.com/llvm/llvm-project/pull/78041 ___

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

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

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

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/93267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-23 Thread Matheus Izvekov via cfe-commits
@@ -3833,6 +3833,11 @@ 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 warn_ppc_musttail_maybe_ignored: Warni

<    2   3   4   5   6   7   8   9   10   >