[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > It would be nice to have a reproducer. I can't tell the root cause from this > error, so I can't use it to strengthen the current tests. I intend to provide a reproducer. I just can't do it today. So don't wait on it as a justification to avoid reverting. https://github.com/

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > I'm not sure I follow. If we "treat the `<0>` as a template argument list, > even if it isn't unambiguously a template argument list.", then aren't > applying CWG1835 at all. Yes, in that case. But I am arguing for selectively applying it. I thought that could work, but I a

[clang] Template Diagnostic Improvements (PR #99933)

2024-07-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: Hi. The change looks good. There are some other examples of bad diagnostics in that issue, and it would be ideal if they are preserved in case this PR closes that issue. Please also add an entry to `clang/docs/ReleaseNotes.rst`. https://github.com/llvm/

[clang] Template Diagnostic Improvements (PR #99933)

2024-07-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! Please give it a couple of days before merging, in case anyone else wants to chime in. https://github.com/llvm/llvm-project/pull/99933 ___ cfe-commits mailing list cfe-commits@list

[clang] Template Diagnostic Improvements (PR #99933)

2024-07-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. These updated test changes still LGTM. https://github.com/llvm/llvm-project/pull/99933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/89807 This patch will finally allow us to mark C++17 support in clang as complete. This is a continuation of the review process from an [old PR in phab](https://reviews.llvm.org/D109496). Recap: The original patch f

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 Thread Matheus Izvekov via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

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

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -1133,8 +1133,8 @@ C++17 implementation status Matching template template parameters to compatible arguments - https://wg21.link/p0522r0";>P0522R0 - Partial (10) + https://wg21.link/p0522r0";>P0522R0 (DR) + Clang 4 (10) mi

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -519,13 +571,45 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, return TemplateDeductionResult::Success; } - if (TemplateTemplateParmDecl *TempParam -= dyn_cast(ParamDecl)) { + if (auto *TempParam = dyn_cast(ParamDecl)) { //

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: So Jason pointed out that GCC's provisional wording for CWG2398 picks a dubious candidate for this example: ```C++ template struct match2; template class t1,typename T> struct match2, typename t1::type > { typedef int type; }; // #5

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/89807 >From 3f6e50edc7b4d4bf4781c71bd29f48224b62822d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 9 Apr 2024 01:14:28 -0300 Subject: [PATCH] [clang] Enable C++17 relaxed template template argument matchi

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

2024-04-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/89807 ___ 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-04-26 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -fno-relaxed-template-template-args -verify=expected,old mizvekov wrote: Okay, I think I m

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

2024-04-26 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new mizvekov wrote: While it's true this is a DR, I just don't think for this particular case it's worth the cost of testing every single mode

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

2024-04-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/89807 >From 43f813d0a1a87b6cad9b859237489778f4f2945f Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 9 Apr 2024 01:14:28 -0300 Subject: [PATCH] [clang] Enable C++17 relaxed template template argument matchi

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

2024-04-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov dismissed https://github.com/llvm/llvm-project/pull/89807 ___ 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-04-26 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -fno-relaxed-template-template-args -verify=expected,old mizvekov wrote: Thanks. Since th

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

2024-04-26 Thread Matheus Izvekov via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

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

2024-04-26 Thread Matheus Izvekov via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

[clang] Fix a crash introduced by 3d5e9ab by adding a nullptr check. (PR #90301)

2024-04-27 Thread Matheus Izvekov via cfe-commits
@@ -54,7 +54,7 @@ class UncountedCallArgsChecker bool shouldVisitImplicitCode() const { return false; } bool TraverseDecl(Decl *D) { -if (isa(D) && isRefType(safeGetName(D))) +if (D && isa(D) && isRefType(safeGetName(D))) return true;

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

2024-04-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/89807 >From 4ee58efa0f154b531dcc674b6f4fe084182aa803 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 9 Apr 2024 01:14:28 -0300 Subject: [PATCH] [clang] Enable C++17 relaxed template template argument matchi

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

2024-04-27 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov We have a bunch of related issues, could you look at them > https://github.com/llvm/llvm-project/issues?q=is%3Aissue+is%3Aopen+%22-frelaxed-template-template-args%22 > ? Removed a bunch of duplicates. 4 issues remaining: 1) #36505 Is the issue we are fixing in this

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

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

[clang] Fix a crash introduced by 3d5e9ab by adding a nullptr check. (PR #90301)

2024-04-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/90301 ___ 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-04-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/89807 >From 1756044e71d756f7102f962d0298627ede27871c Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 9 Apr 2024 01:14:28 -0300 Subject: [PATCH] [clang] Enable C++17 relaxed template template argument matchi

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -91,15 +91,60 @@ void bar() { namespace GH82104 { -template int Zero = 0; +template int Value = sizeof...(D); -template -using T14 = decltype([]() { return Zero; }()); +template +using T14 = decltype([](auto Param) { + return Value + V + (int)sizeof(Param); +}("hell

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. I agree this is not the long term way forward, but it improves the current interim solution, so LGTM, minus nit. https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-c

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -91,15 +91,84 @@ void bar() { namespace GH82104 { -template int Zero = 0; +template int Value = sizeof...(D); mizvekov wrote: ```suggestion template constexpr int Value = sizeof...(D); ``` https://github.com/llvm/llvm-project/pull/89934 __

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

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

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -972,8 +972,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) -for (auto *PVD : FD->parameters()) - ScopeForParameters

[clang] [clang][Sema] Fix particular operator overload crash (PR #105976)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -7425,6 +7425,13 @@ void Sema::AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, /*ExplicitArgs*/ nullptr, ObjectType, ObjectClassification, Args, CandidateSet, Supp

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -5346,7 +5346,6 @@ static EvalStmtResult EvaluateStmt(StmtResult &Result, EvalInfo &Info, const Expr *RetExpr = cast(S)->getRetValue(); FullExpressionRAII Scope(Info); if (RetExpr && RetExpr->isValueDependent()) { - EvaluateDependentExpr(RetExpr, Info); ---

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -5554,38 +5869,50 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( // "that is a member function with no expicit object argument". // Otherwise the ordering rules for methods with expicit objet arguments // against anything else make no sense. -Shou

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

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

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -5554,38 +5869,50 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( // "that is a member function with no expicit object argument". // Otherwise the ordering rules for methods with expicit objet arguments // against anything else make no sense. -Shou

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From f8fd471a954f5e304f3118df3236cf7ff4ef1020 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH 1/2] [clang] check deduction consistency when partial ordering

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -1307,6 +1304,62 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams, return TemplateDeductionResult::Success; } +/// Deduce the template arguments by comparing the list of parameter +/// types to the list of argument types, as in the parameter-type

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From f8fd471a954f5e304f3118df3236cf7ff4ef1020 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH 1/3] [clang] check deduction consistency when partial ordering

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/106335 As agreed on https://github.com/itanium-cxx-abi/cxx-abi/issues/109 these placeholders should be mangled as a `template-prefix` production. ``` ::=# global template ::=

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/106335 >From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 28 Aug 2024 00:34:12 -0300 Subject: [PATCH] [clang] mangle placeholder for deduced type as a template-pr

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-28 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s + +template class S> +void create_unique() + requires (S{0}, true) {} + +template struct A { + constexpr A(Fn) {}; +}; + +template void create_unique(); +// CHECK: @_

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/106335 >From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 28 Aug 2024 00:34:12 -0300 Subject: [PATCH 1/2] [clang] mangle placeholder for deduced type as a templat

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/100692 ___ 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 #94981)

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

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: FWIW, I meant to review this, but somehow this disappeared from my waiting for review list and I lost track of it :) https://github.com/llvm/llvm-project/pull/102444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Awesome, thanks! I will give a review later, but just want to note a different (but much smaller) PR touching the same area: https://github.com/llvm/llvm-project/pull/102922 Just to keep in mind that the idea is to later further simplify `getTemplateInstantiationArgs` by remo

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread Matheus Izvekov via cfe-commits
@@ -13051,11 +13051,14 @@ class Sema final : public SemaBase { /// instantiation arguments. /// /// \param DC In the event we don't HAVE a declaration yet, we instead provide - /// the decl context where it will be created. In this case, the `Innermost` - /// shoul

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread Matheus Izvekov via cfe-commits
@@ -1144,6 +1164,46 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints( PointOfInstantiation, Satisfaction); } +bool Sema::CheckFunctionConstraintsWithoutInstantiation( +SourceLocation PointOfInstantiation, FunctionTemplateDecl

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-29 Thread Matheus Izvekov via cfe-commits
@@ -1144,6 +1164,46 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints( PointOfInstantiation, Satisfaction); } +bool Sema::CheckFunctionConstraintsWithoutInstantiation( +SourceLocation PointOfInstantiation, FunctionTemplateDecl

[clang] a0441ce - [NFC] whitespace cleanup on clang/test/SemaTemplate/temp_arg_nontype.cpp

2024-08-29 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2024-08-29T16:03:42-03:00 New Revision: a0441ced7a770036e00610989e2fabba5caeb31b URL: https://github.com/llvm/llvm-project/commit/a0441ced7a770036e00610989e2fabba5caeb31b DIFF: https://github.com/llvm/llvm-project/commit/a0441ced7a770036e00610989e2fabba5caeb31b.dif

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/106335 >From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 28 Aug 2024 00:34:12 -0300 Subject: [PATCH 1/2] [clang] mangle placeholder for deduced type as a templat

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

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

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks. I'll be happy to continue on post-commit if @zygoloid or @rjmccall have any concerns. https://github.com/llvm/llvm-project/pull/106335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Reduction: ``` template struct __promote { using type = float; }; template class complex {}; template complex<_Tp> pow(const complex<_Tp> &) {}; template complex::type> pow(_Tp) = delete; using F0 = complex (*)(const complex &); F0 ptr{pow}; ``` This is the same as the

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/106829 This applies to function template non-call partial ordering the same provisional wording change applied in the call context: Don't perform the consistency check on return type and parameters which didn't have

[clang] [clang][ASTImporter] New fix for default template parameter values. (PR #101836)

2024-08-31 Thread Matheus Izvekov via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -5968,11 +5962,21 @@ ASTNodeImporter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { } if (D->hasDefaultArgument()) { +// Default argument can be "inherited" when it has a reference

[clang] [clang][ASTImporter] New fix for default template parameter values. (PR #101836)

2024-08-31 Thread Matheus Izvekov via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= , =?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/mizvekov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101836 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: FYI @DavidTruby @DavidSpickett https://github.com/llvm/llvm-project/pull/106829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

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

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @DavidTruby @DavidSpickett A fix for this issue is up at https://github.com/llvm/llvm-project/pull/106829 https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] NFCI: don't check deduced constraints when partial ordering (PR #106882)

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

[clang] [clang] NFCI: don't check deduced constraints when partial ordering (PR #106882)

2024-08-31 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/106882 We were incorrectly applying [temp.deduct]p5 to partial ordering. Marked as NFCI as I don't think the difference is actually observable in practice. During partial ordering, the deduced arguments will mostly b

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-08-31 Thread Matheus Izvekov via cfe-commits
@@ -3237,6 +3237,40 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction( return TemplateDeductionResult::Success; } +/// Complete template argument deduction for DeduceTemplateArgumentsFromType. +/// FIXME: this is mostly duplicated with the above two versions

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-31 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/106829 >From a3c08127868fb3b77c8cc79355e43ab5288371fc Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 30 Aug 2024 17:37:55 -0300 Subject: [PATCH] [clang] function template non-call partial ordering fixes Th

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

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

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-07-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: FYI, the commit 99873b35da7ecb905143c8a6b8deca4d4416f1a9, which lists this PR as a motivator, causes breakage building a project, which I am still looking for a reduced test case. The commit is not NFC despite what is says, just by cursory inspection of the change. Please avo

[clang] [Clang][Sema] Handle class member access expressions with valid nested-name-specifiers that become invalid after lookup (PR #98167)

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

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-07-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The reproducer turned out to be pretty simple: ```C++ export module a; module :private; static void f() {} void g() { f(); } ``` Compiles without that patch, otherwise produces: ``` error: no matching function for call to 'f' ``` > Oh, sorry, I took another look at the commi

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Matheus Izvekov via cfe-commits
@@ -99,3 +99,28 @@ BFoo b2(1.0, 2.0); // CHECK-NEXT: | | |-ParmVarDecl {{.*}} 'type-parameter-0-0' // CHECK-NEXT: | | `-ParmVarDecl {{.*}} 'type-parameter-0-0' // CHECK-NEXT: | `-CXXDeductionGuideDecl {{.*}} implicit used 'auto (double, double) -> Foo' implicit_instantiation +

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Matheus Izvekov via cfe-commits
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform { // Find all template parameters that appear in the given DeducedArgs. // Return the indices of the template parameters in the TemplateParams. SmallVector TemplateParamsReferencedInTemplateArgumentList(

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, sans: * missing newline at end of test file * A similar test for template template parameter. https://github.com/llvm/llvm-project/pull/98013 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (PR #96364)

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

[clang] [clang-tools-extra] [Clang][AST] Move NamespaceDecl bits to DeclContext (PR #98567)

2024-07-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, as a clean up, and I see no notable performance implications. Is there any follow up work for this? https://github.com/llvm/llvm-project/pull/98567 ___ cfe-commits mailing list cfe-commits@

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-07-12 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Clarifying a couple of things here I think we need the distinction between simple NFC, for trivial, non-controversial and non-surprising changes like some renames, small whitespace / formatting change, documentation changes, and complex NFC, which requires some thinking and

[clang] [clang] Prevent dangling StringRefs (PR #98699)

2024-07-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM. If it does fix the mentioned issue, please add a release note. https://github.com/llvm/llvm-project/pull/98699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Clang][NFCI] Remove records of unsatisfied atomic expressions in ConstraintSatisfaction (PR #98654)

2024-07-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, I agree that we currently don't use it, so we might as well remove it. But the overall situation is all wrong, we shouldn't be storing fully formed diagnostic strings in the AST, we should be storing them as PartialDiagnostics. But

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-12 Thread Matheus Izvekov via cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs()) -CheckConstrainedAuto( -AutoT, -

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-12 Thread Matheus Izvekov via cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs()) -CheckConstrainedAuto( -AutoT, -

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. See previous comments, I think this is primarily an error recovery issue on the decltype, we shouldn't let it escape an undeduced auto, as that would confuse further analysis. https://github.com/llvm/llvm-project/pull/98622 __

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-07-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > That's a pretty substantial policy change to propose, and this probably isn't > the place to propose/discuss it. If that's your intent, probably best to take > that up on discord. > I am not proposing a policy change. I believe the current policy is aimed at giving an escap

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-15 Thread Matheus Izvekov via cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs()) -CheckConstrainedAuto( -AutoT, -

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-15 Thread Matheus Izvekov via cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs()) -CheckConstrainedAuto( -AutoT, -

[clang] [clang] Add deprecation warning for `-Ofast` driver option (PR #98736)

2024-07-15 Thread Matheus Izvekov via cfe-commits
@@ -442,6 +442,9 @@ def warn_drv_deprecated_arg : Warning< def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning< "argument '-fno-relaxed-template-template-args' is deprecated">, InGroup; +def warn_drv_deprecated_arg_ofast : Warning< + "argument '-Ofast'

[clang] [Clang][Sema] fix a bug on constraint check with template friend function (PR #90646)

2024-05-01 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I agree with @sdkrystian, even though the test crashes for maybe yet another reason, it demonstrates you can friend a function from a different template context, so comparing the depths from different branches is not helpful. https://github.com/llvm/llvm-project/pull/90646

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

2024-05-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/89807 ___ 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-01 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/90820 This solves some ambuguity introduced in P0522 regarding how template template parameters are partially ordered, and should reduce the negative impact of enabling `-frelaxed-template-template-args` by default.

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

2024-05-01 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I had some discussion about that with @Endilll on the previous MR regarding this core issue: https://github.com/llvm/llvm-project/pull/89807 Since there is no posting at all in core about any possible solutions, I wanted to get feedback from t

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

2024-05-01 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-01 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Note we are not implementing the solution Jason posted on the core mailing list, neither on the previous patch, as we have a better solution than current GCC on this, nor on this MR, as GCC implements no such workaround and still fails this te

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

2024-05-01 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. https://

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

2024-05-01 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Sounds like should perhaps note that we are implementing our own resolution, > until there's an update to the cwg issue that can be referred to? That could be. Is there another similar issue we could use as a reference on the format for this

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

<    1   2   3   4   5   6   7   8   9   10   >