[clang] [clang] StmtPrinter: Handle DeclRefExpr to a Decomposition (PR #125001)

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

[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124997 >From 087997a38f4c64f7c305142ca630777d35b6a126 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 29 Jan 2025 19:34:24 -0300 Subject: [PATCH] [clang] C++20 Modules: document how to perform automated red

[clang] [clang] StmtPrinter: Handle DeclRefExpr to a Decomposition (PR #125001)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/125001 >From 7e687ef989c8eceba8060e95bd7c19dfdb6af19b Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 29 Jan 2025 21:07:15 -0300 Subject: [PATCH] [clang] StmtPrinter: Handle DeclRefExpr to a Decomposition A

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -1257,28 +1257,48 @@ void StmtPrinter::VisitConstantExpr(ConstantExpr *Node) { } void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) { - if (const auto *OCED = dyn_cast(Node->getDecl())) { + ValueDecl *VD = Node->getDecl(); + if (const auto *OCED = dyn_cast(VD)) {

[clang] [clang] StmtPrinter: Handle DeclRefExpr to a Decomposition (PR #125001)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/125001 A DeclRefExpr could never refer to a Decomposition in valid C++ code, but somehow the Analyzer creates these entities and then it tries to print them. There is no sensible answer here, so we print 'decompositi

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -1257,28 +1257,48 @@ void StmtPrinter::VisitConstantExpr(ConstantExpr *Node) { } void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) { - if (const auto *OCED = dyn_cast(Node->getDecl())) { + ValueDecl *VD = Node->getDecl(); + if (const auto *OCED = dyn_cast(VD)) {

[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/124997 None >From ea6f1cbcdea32d5554c6be962b4e79b23d7471ed Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 29 Jan 2025 19:34:24 -0300 Subject: [PATCH] [clang] C++20 Modules: document how to perform automate

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -1257,28 +1257,48 @@ void StmtPrinter::VisitConstantExpr(ConstantExpr *Node) { } void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) { - if (const auto *OCED = dyn_cast(Node->getDecl())) { + ValueDecl *VD = Node->getDecl(); + if (const auto *OCED = dyn_cast(VD)) {

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang] Track function template instantiation from definition (PR #112241)

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

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

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

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

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

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,38 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang] Track function template instantiation from definition (PR #112241)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/112241 >From c1f3c40382b79a3aa3fb422b6f7382a1f7d7c6f5 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 28 Sep 2024 14:28:58 -0300 Subject: [PATCH] [clang] Track function template instantiation from definition

[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/111894 >From 9bfdecf255d83794108d7d7ae507dbf8c5bdb156 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 10 Oct 2024 15:40:48 -0300 Subject: [PATCH] [clang] Remove the deprecated flag `-frelaxed-template-templ

[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/111894 >From c15f2faaa2cdc2c6516899c1c0e3c0d90f74f1eb Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 10 Oct 2024 15:40:48 -0300 Subject: [PATCH] [clang] Remove the deprecated flag `-frelaxed-template-templ

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Matheus Izvekov via cfe-commits
@@ -11714,13 +11714,37 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

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

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/124858 ast-print: A DeclRef to an anonymous NTTP will print 'value-parameter--', similar to how we print type parameters. ast-dump: A bareDeclRef to an anonymous entity will print some extra identifying information,

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124858 >From dcf882d61f09c3218f1df372e4dbc82406820f8d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 27 Jan 2025 01:04:47 -0300 Subject: [PATCH] [clang] improve print / dump of anonymous declarations ast-p

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124858 >From bdcb8e21182f23fa39b5bba1b5d523f93d3d0ff1 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 27 Jan 2025 01:04:47 -0300 Subject: [PATCH] [clang] improve print / dump of anonymous declarations ast-p

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-28 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++20 %s 2>&1 | FileCheck %s + +struct A { + static A a; + char b; + friend bool operator==(A, A) = default; +}; +bool _ = A() == A::a; + +// CHECK-LABEL: bool opera

[clang] Reland: [clang] improve print / dump of anonymous declarations (PR #124858)

2025-01-28 Thread Matheus Izvekov via cfe-commits
@@ -1257,28 +1257,48 @@ void StmtPrinter::VisitConstantExpr(ConstantExpr *Node) { } void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) { - if (const auto *OCED = dyn_cast(Node->getDecl())) { + ValueDecl *VD = Node->getDecl(); + if (const auto *OCED = dyn_cast(VD)) {

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The test case provided shows a bug in the original implementation of the analyzer anyway. Here is the clang output for the slightly reduced repro: ```C++ struct A { static A a; char b; friend bool operator==(A, A) = default; }; bool _ = A() == A::a; ``` Original clang out

[clang] [Clang][Driver] Add new flags to control machine instruction verification (PR #70282)

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

[clang] [clang] NFC: cleanup check template argument (PR #124668)

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

[clang] [clang] NFC: cleanup check template argument (PR #124668)

2025-01-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Changes to DR tests look good. No changes to test, that was just noise from GitHub auto-rebasing, sorry about that. https://github.com/llvm/llvm-project/pull/124668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang] NFC: cleanup check template argument (PR #124668)

2025-01-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124668 >From c6bfaae1908fec0b867ba5adc47b4043cbf5900e Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 27 Jan 2025 19:18:27 -0300 Subject: [PATCH] [clang] NFC: cleanup check template argument --- clang/incl

[clang] [clang] NFC: cleanup check template argument (PR #124668)

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

[clang] [clang] fix nondeduced mismatch with nullptr template arguments (PR #124498)

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

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-28 Thread Matheus Izvekov via cfe-commits
@@ -4870,9 +4870,21 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">; -

[clang] [clang] fix nondeduced mismatch with nullptr template arguments (PR #124498)

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

[clang] [clang] fix nondeduced mismatch with nullptr template arguments (PR #124498)

2025-01-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124498 >From 0e3246e46820df6d13ea623e20c8226c571d4f9a Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 27 Jan 2025 00:04:59 -0300 Subject: [PATCH] [clang] fix nondeduced mismatch with nullptr template argume

[clang] [clang] fix template argument conversion (PR #124386)

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

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-28 Thread Matheus Izvekov via cfe-commits
@@ -4870,9 +4870,21 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">; -

[clang] [clang] fix template argument conversion (PR #124386)

2025-01-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124386 >From 8cf1056761d23fe3191d1ac3421da350b7404eb1 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 24 Jan 2025 19:25:38 -0300 Subject: [PATCH] [clang] fix template argument conversion Converted template

[clang] [clang] fix template argument conversion (PR #124386)

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

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

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

[clang] eb10e94 - NFC: convert clang/test/AST/HLSL/StructuredBuffers-AST.hlsl to unix line endings

2025-01-28 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-01-28T15:48:34-03:00 New Revision: eb10e94180dd722cf54cfaf1ed9d32aa0bb134a0 URL: https://github.com/llvm/llvm-project/commit/eb10e94180dd722cf54cfaf1ed9d32aa0bb134a0 DIFF: https://github.com/llvm/llvm-project/commit/eb10e94180dd722cf54cfaf1ed9d32aa0bb134a0.dif

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-27 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-27 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Matheus Izvekov via cfe-commits
@@ -875,7 +875,41 @@ void TextNodeDumper::dumpBareDeclRef(const Decl *D) { if (const NamedDecl *ND = dyn_cast(D)) { ColorScope Color(OS, ShowColors, DeclNameColor); -OS << " '" << ND->getDeclName() << '\''; +if (DeclarationName Name = ND->getDeclName()) + OS

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124605 >From cf6413e220574adac3c89b28cc5011050ce11144 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 27 Jan 2025 15:08:01 -0300 Subject: [PATCH 1/2] NFC: convert clang/test/AST/HLSL/StructuredBuffers-AST.h

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Matheus Izvekov via cfe-commits
@@ -875,7 +875,41 @@ void TextNodeDumper::dumpBareDeclRef(const Decl *D) { if (const NamedDecl *ND = dyn_cast(D)) { ColorScope Color(OS, ShowColors, DeclNameColor); -OS << " '" << ND->getDeclName() << '\''; +if (DeclarationName Name = ND->getDeclName()) + OS

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

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

[clang] [clang] improve print / dump of anonymous declarations (PR #124605)

2025-01-27 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/124605 ast-print: A DeclRef to an anonymous NTTP will print 'value-parameter--', similar to how type parameters are printed. ast-dump: A bareDeclRef to an anonymous entity will print some extra identifying informati

[clang] [Clang] Remove unnecessary Decl transform & profiles for SizeOfPackExpr (PR #124533)

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

[clang] 7107f55 - [clang] NFC: remove redundant dyn_cast

2025-01-26 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-01-27T00:26:38-03:00 New Revision: 7107f55d82f8d1077d5478e8f58c94851385c06f URL: https://github.com/llvm/llvm-project/commit/7107f55d82f8d1077d5478e8f58c94851385c06f DIFF: https://github.com/llvm/llvm-project/commit/7107f55d82f8d1077d5478e8f58c94851385c06f.dif

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From 8210ac8a213a8409dc3b470fb295b70e8264934d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From f2df46da93aeeaed9f774322231866a7509e3fa0 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-25 Thread Matheus Izvekov via cfe-commits
@@ -66,8 +66,9 @@ namespace DependentType { using ok = Pt, tT0>; using err1 = tT0; // expected-error {{too few template arguments for class template 'ii'}} // expected-note@-1 {{different template parameters}} - using err2 = tT0; // FIXME: sh

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From 1d9605013487b8361ff471ef494b4be94bd37470 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

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

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From 7a7950dd8fd6a01cdc0d1351b86962798d300ea6 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/124313 This fixes the core issue described in P3579, following the design intent of P0522 to not introduce any new cases where a template template parameter match is allowed for a template which is not valid for all

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

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

[clang] [libcxx] Reland: [clang] unified CWG2398 and P0522 changes; finishes implementation of P3310 (PR #124137)

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

[clang] Reland: [clang] unified CWG2398 and P0522 changes; finishes implementation of P3310 (PR #124137)

2025-01-23 Thread Matheus Izvekov via cfe-commits
@@ -5570,61 +5570,73 @@ bool Sema::CheckTemplateArgumentList( } if (ArgIdx < NumArgs) { - // Check the template argument we were given. - if (CheckTemplateArgument(*Param, NewArgs[ArgIdx], Template, TemplateLoc, -RAngleLoc, Sug

[clang] Reland: [clang] unified CWG2398 and P0522 changes; finishes implementation of P3310 (PR #124137)

2025-01-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Can you explain the revert-issue, and what you did to fix it? The github diff > is making REALLY difficult to understand what you did.. If you go on the commit list, you can click on the commit which I pointed out in the OP ([clang] Changes to template argument list checking"

[clang] [Clang] Correctly propagate type aliases' unexpanded flags up to lambda (PR #122875)

2025-01-17 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. I think the change is ok, but I don't think this fixes the underlying issue. There is something generally wrong with type aliases which don't use all of their parameters, and this needs more thought. https://github.com/llvm/llvm-project/p

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

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

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

2025-01-14 Thread Matheus Izvekov via cfe-commits
@@ -7035,17 +7035,16 @@ class DependentNameType : public TypeWithKeyword, public llvm::FoldingSetNode { : TypeWithKeyword(Keyword, DependentName, CanonType, TypeDependence::DependentInstantiation | toTypeDependence(NNS-

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

2025-01-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Indeed a DependentNameType with no 'Name' doesn't make sense. https://github.com/llvm/llvm-project/pull/122418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-07 Thread Matheus Izvekov via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -1228,35 +1228,45 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, NonTypeTemplateParmDecl *NewConstrainedParm,

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-01-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, though I would have preferred to keep the patches separate, it's less of a revert risk. https://github.com/llvm/llvm-project/pull/121044 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang] Added nullptr check to getFriendDecl access (PR #121056)

2025-01-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: We also usually attach the issue number to the test case somehow, either put the new test cases under a namespace named `GH120857`, or rename the new test file to that same name. https://github.com/llvm/llvm-project/pull/121056 ___

[clang] [Clang] Added nullptr check to getFriendDecl access (PR #121056)

2025-01-07 Thread Matheus Izvekov via cfe-commits
@@ -886,6 +886,7 @@ Bug Fixes to C++ Support out of a module (which is the case e.g. in MSVC's implementation of ``std`` module). (#GH118218) - Fixed a pack expansion issue in checking unexpanded parameter sizes. (#GH17042) - Fixed a bug where captured structured bindings w

[clang] [Clang] Added nullptr check to getFriendDecl access (PR #121056)

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

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-07 Thread Matheus Izvekov via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -1228,35 +1228,45 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, NonTypeTemplateParmDecl *NewConstrainedParm,

[clang] [C++20] [Modules] [Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Can you reduce your modules test case into a self contained project with build system? If so, you can use [cvise](https://github.com/marxin/cvise) for reducing a whole project directory recursively in one invocation. https://github.com/llvm/llvm-project/pull/121245 ___

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2024-12-24 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks! I think I completely missed the fact these were both reverted. https://github.com/llvm/llvm-project/pull/121044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-12-16 Thread Matheus Izvekov via cfe-commits
@@ -4692,6 +4692,17 @@ bool Sema::InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param) { assert(Param->hasUninstantiatedDefaultArg()); + // FIXME: We don't track member specialization info for non-de

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

2024-12-10 Thread Matheus Izvekov via cfe-commits
@@ -17658,8 +17662,49 @@ HandleImmediateInvocations(Sema &SemaRef, } } +static void setContextDecl(Sema &S, Decl *Base, Decl *ContextDecl) { + switch (Base->getKind()) { + case Decl::CXXRecord: { +auto *RD = cast(Base); +RD->setLambdaContextDecl(ContextDecl); +

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

2024-12-10 Thread Matheus Izvekov via cfe-commits
@@ -17658,8 +17662,49 @@ HandleImmediateInvocations(Sema &SemaRef, } } +static void setContextDecl(Sema &S, Decl *Base, Decl *ContextDecl) { + switch (Base->getKind()) { + case Decl::CXXRecord: { +auto *RD = cast(Base); +RD->setLambdaContextDecl(ContextDecl); +

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

2024-12-10 Thread Matheus Izvekov via cfe-commits
@@ -8494,10 +8495,21 @@ DeclResult Sema::ActOnClassTemplateSpecialization( return Specialization; } -Decl *Sema::ActOnTemplateDeclarator(Scope *S, - MultiTemplateParamsArg TemplateParameterLists, -Declarator &D

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

2024-12-10 Thread Matheus Izvekov via cfe-commits
@@ -7946,6 +7980,8 @@ class Sema final : public SemaBase { /// A stack of expression evaluation contexts. SmallVector ExprEvalContexts; + SmallVector PendingLazyContextDecls; mizvekov wrote: The intention is that they are used for any declarations where

[clang] [libcxx] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-12-06 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I still find the current approach wrt the warning to be odd, we would basically force every modules user to change their command line, either by adding the new `-fmodules-reduced-bmi`, or add `-Wno-wathever` to suppress the warning, or just learn to live with the warning I gue

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-06 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/118236 ___ 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] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-06 Thread Matheus Izvekov via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [Clang] Enable -fpointer-tbaa by default. (PR #117244)

2024-12-04 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: I think this is a strict improvement over the general 'fstrict-aliasing' mode we already have, and I see little value in maintaining separate levels of strict aliasing conformance long term. I think it would not be a good situation for users to rely on so

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,15 +5347,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); - // Note: if t

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,15 +5347,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); - // Note: if t

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Yeah, this LGTM, thanks again. https://github.com/llvm/llvm-project/pull/115487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-11-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I think this is too risky to become the default. We could map out what are the most user affecting compat issues here, and start from there, without opening the floodgates all at once. https://github.com/llvm/llvm-project/pull/117840

[clang] Revert "Reland: [clang][test] add testing for the AST matcher reference" (PR #116477)

2024-11-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Can you please describe the reason the patch was reverted? It's better to put this information in the commit message. https://github.com/llvm/llvm-project/pull/116477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

  1   2   3   4   5   6   7   8   9   10   >