[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

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

[clang] [clang] Fix assertion failure in constexpr union deserialization (PR #140179)

2025-05-16 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM Something like: * Fixes serialization of constexpr structs containing unions. (#GH140130) https://github.com/llvm/llvm-project/pull/140179 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

2025-05-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! > I added several tests with dead branches. I noticed that Clang missed NRVO > opportunity in create_object5 test. I wonder if it is a know issue or not. > GCC seems to handle it. Yeah I think so, the current NRVO algorithm

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in DeclCXX (PR #140078)

2025-05-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Hi, no objections to the patch, but I am wondering if there is a larger reason behind this effort to simplify all these uses of getTrailingObjects. Are you planning on an API change in this area for instance? https://github.com/llvm/llvm-project/pull/140078

[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

2025-05-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Thank you for your feedback. I added more tests. By "function templates with > placeholder return types", do you mean something similar to create_object4 in > my test case? Yep. That's what I meant. https://github.com/llvm/llvm-project/pull/139973 ___

[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

2025-05-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: Thanks. This needs a few more tests. * A few tests to make sure we don't produce false positives. * Tests with function templates with placeholder return types. We should never be performing copy elision for these, due to implementation limitations. htt

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-14 Thread Matheus Izvekov via cfe-commits
@@ -6484,6 +6499,57 @@ class SubstTemplateTypeParmType final } }; +/// Represents the result of substituting a set of types as a template argument +/// that needs to be expanded later. +/// +/// These types are always dependent and produced depending on the situations: +///

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-14 Thread Matheus Izvekov via cfe-commits
@@ -1666,6 +1685,21 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +using TreeTransform::TransformTemplateSpecializationType; +QualType +TransformTemplateSpecializationType(TypeLocBuilder &TLB, +

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Matheus Izvekov via cfe-commits
@@ -1666,6 +1685,21 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +using TreeTransform::TransformTemplateSpecializationType; +QualType +TransformTemplateSpecializationType(TypeLocBuilder &TLB, +

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-13 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Perfect, thanks! https://github.com/llvm/llvm-project/pull/139436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix missing initializer for inline static template member with auto caused by delayed template instantiation. (PR #138122)

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

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-11 Thread Matheus Izvekov via cfe-commits
@@ -5751,14 +5751,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { -NamedDecl *ND = Function; -DeclContext *DC

[clang] [Clang] Reland: Diagnose invalid function types in dependent contexts (PR #139246)

2025-05-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Hello, it is helpful to include link to original landing attempt, and a brief description of what changed since last time, or otherwise explanation of why we go ahead and reland with no changes anyway. https://github.com/llvm/llvm-project/pull/139246 ___

[clang] Revert "[Clang] Diagnose invalid function types in dependent contexts (#138731)" (PR #139176)

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

[clang] Revert "[Clang] Diagnose invalid function types in dependent contexts (#138731)" (PR #139176)

2025-05-08 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/139176 This reverts commit cf9b4d1e7961214deabd99a9fc3b1d4c9e78a71f. Causes breakages as reported here: https://github.com/llvm/llvm-project/pull/138731#issuecomment-2864298000 >From 57f8029736da494f1702fe76514e8119

[clang] [Clang] Diagnose invalid function types in dependent contexts (PR #138731)

2025-05-08 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: This is reverted now. https://github.com/llvm/llvm-project/pull/138731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix handling of pack indexing types in constraints of redeclaration (PR #139057)

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

[clang] [Clang] Fix handling of pack indexing types in constraints of redeclaration (PR #139057)

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

[clang] [Clang] Fix handling of pack indexing types in constraints of redeclaration (PR #139057)

2025-05-08 Thread Matheus Izvekov via cfe-commits
@@ -4174,6 +4174,14 @@ PackIndexingType::computeDependence(QualType Pattern, Expr *IndexExpr, return TD; } +void PackIndexingType::Profile(llvm::FoldingSetNodeID &ID, + const ASTContext &Context) { + if (hasSelectedType() && isFullySubstituted

[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-05-08 Thread Matheus Izvekov via cfe-commits
@@ -12166,6 +12174,15 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, diag::note_ovl_candidate_explicit_arg_mismatch_unnamed) << (index + 1); } + +if (PartialDiagnosticAt *PDiag = DeductionFailure.getSFINAEDiagnost

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Can you confirm that the intent here is to restore mangler behavior to what > it was prior to #132401, making the pair of PRs ABI-neutral? I a bit confused here as well. The description on the PR doesn't say this, but the patch seems to claim that https://github.com/llvm/llvm

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-07 Thread Matheus Izvekov via cfe-commits
@@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks -std=c++11 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks -std=c++11 | FileCheck --check-prefixes=CHECK,CHECK-ABI-LATEST %s +// RUN: %clang_c

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-07 Thread Matheus Izvekov via cfe-commits
@@ -3102,11 +3103,15 @@ void CXXNameMangler::mangleType(QualType T) { addSubstitution(T); } -void CXXNameMangler::mangleCXXRecordDecl(const CXXRecordDecl *Record) { +void CXXNameMangler::mangleCXXRecordDecl(const CXXRecordDecl *Record, +

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

2025-05-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @ziqingluo-90 I had already responded here: https://github.com/llvm/llvm-project/issues/130778#issuecomment-2843256610 I think you moved your post between issues after I had responded. https://github.com/llvm/llvm-project/pull/124137

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: I won't have time to review this closely until next week. I think the 'inside profile' is a red herring here, this looks more like a problem from calling it from within deserialization. We could try getting to the bottom of it and see if we can assert in

[clang] [clang] Add test for QualTypes in template class NNS (PR #137804)

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

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

2025-04-24 Thread Matheus Izvekov via cfe-commits
@@ -399,3 +399,20 @@ namespace type_qualifier { // CHECK: @_ZN14type_qualifier1gIPiEEvDTcmcvv_ELi1EE template void g(int); } + +namespace unresolved_template_specialization_type { + template struct enable_if {}; + struct Foo { +static const int value = true; + }; +

[clang] c7fbaba - [clang] fix typo in CHECK line

2025-04-24 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-04-24T13:01:39-03:00 New Revision: c7fbabaf87f9411fbcc48a33efaa76f0f03135e9 URL: https://github.com/llvm/llvm-project/commit/c7fbabaf87f9411fbcc48a33efaa76f0f03135e9 DIFF: https://github.com/llvm/llvm-project/commit/c7fbabaf87f9411fbcc48a33efaa76f0f03135e9.dif

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

2025-04-24 Thread Matheus Izvekov via cfe-commits
@@ -399,3 +399,20 @@ namespace type_qualifier { // CHECK: @_ZN14type_qualifier1gIPiEEvDTcmcvv_ELi1EE template void g(int); } + +namespace unresolved_template_specialization_type { + template struct enable_if {}; + struct Foo { +static const int value = true; + }; +

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

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @emaxx-google thanks for the reproducer. I will be off to C++Now soon, so it's unlikely I will have time to take a look at that in the next two weeks, sorry about that. https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: You can still do that with a "builtin-type as sugar" approach, you just have to make it a non-canonical node (ie `isSugared()` returns true). It's one of the options, and whether we print an aka or not is still a diagnostic policy (we should do it only if it's relevant, but our

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: If you make it a canonical node, you also automatically don't get an `aka` in diagnostics, which might be an advantage (or not). Ie you avoid the aka in `size_t (aka 'unsigned long')` you currently get. https://github.com/llvm/llvm-project/pull/136542 __

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: If the reason to even consider doing this as a new builtin type is due to templates, please don't do that. The better alternative here is to wait for template specialization resugaring to land. https://github.com/llvm/llvm-project/pull/136542 __

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > The main purpose is for these expressions, with templates being just one > possible beneficiary. Sure, but outside of templates, all forms of type sugar are preserved just fine in the current implementation, so there would be no particular reason to pursue a different builti

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-23 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: With template specialization resugaring, these being typedefs still help somewhat: https://compiler-explorer.com/z/qKxbYMEGq You have to make a bit of contortion to expose the intermediate type, but I think that's partly due to a different problem, where in diagnostics we don't

[clang] Reland [clang] Handle instantiated members to determine visibility (#136128) (PR #136689)

2025-04-22 Thread Matheus Izvekov via cfe-commits
@@ -4787,8 +4787,10 @@ LinkageInfo LinkageComputer::computeTypeLinkageInfo(const Type *T) { return computeTypeLinkageInfo(cast(T)->getPointeeType()); case Type::MemberPointer: { const auto *MPT = cast(T); -LinkageInfo LV = -getDeclLinkageAndVisibility(MPT

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/136295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-21 Thread Matheus Izvekov via cfe-commits
@@ -34,21 +34,22 @@ void test_invalid_call_1(int s) { int some_func2(int a, int b); void test_invalid_call_2() { - // CHECK: -RecoveryExpr {{.*}} 'int' contains-errors + // CHECK: -RecoveryExpr {{.*}} '' contains-errors mizvekov wrote: Okay, since this

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-18 Thread Matheus Izvekov via cfe-commits
@@ -34,21 +34,22 @@ void test_invalid_call_1(int s) { int some_func2(int a, int b); void test_invalid_call_2() { - // CHECK: -RecoveryExpr {{.*}} 'int' contains-errors + // CHECK: -RecoveryExpr {{.*}} '' contains-errors mizvekov wrote: If calling ActOnC

[clang] [Clang] Improve error recovery for invalid calls (PR #136295)

2025-04-18 Thread Matheus Izvekov via cfe-commits
@@ -34,21 +34,22 @@ void test_invalid_call_1(int s) { int some_func2(int a, int b); void test_invalid_call_2() { - // CHECK: -RecoveryExpr {{.*}} 'int' contains-errors + // CHECK: -RecoveryExpr {{.*}} '' contains-errors mizvekov wrote: FWIW I think its

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

2025-04-17 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/136201 This fixes a regression introduced in #133610 which was reported here #133610 (comment) and in #136119 This redoes previous attempt in #135111 When mangling a DTST which appears in the prefix, the template na

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

2025-04-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @usx95 that reproducer is fixed by https://github.com/llvm/llvm-project/pull/136201 as well. https://github.com/llvm/llvm-project/pull/135111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

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

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

[clang] [clang] Handle instantiated members to determine visibility (PR #136128)

2025-04-17 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Thanks! LGTM as well. https://github.com/llvm/llvm-project/pull/136128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Fix elaborated keyword canonicalization (PR #135916)

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

[clang] Reapply "[Clang] Fix dependent local class instantiation bugs" (PR #135914)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -347,7 +347,7 @@ ParsedType Sema::getDestructorName(const IdentifierInfo &II, QualType T = CheckTypenameType(ElaboratedTypeKeyword::None, SourceLocation(), SS.getWithLocInContext(Context), II, NameLoc); -return ParsedType::make(T); +

[clang] [clang-tools-extra] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135916 >From 0bdab9c8e1093eaa80bae640385e4ad7714e4a95 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 02:55:50 -0300 Subject: [PATCH 1/2] [clang] preserve sugar on initializer_list deduction ---

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// immediately following this class. template const T *getAs() const; + /// Look through sugar for an instance of TemplateSpecializationType which + /// is not a type alias. +

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// immediately following this class. template const T *getAs() const; + /// Look through sugar for an instance of TemplateSpecializationType which + /// is not a type alias. +

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

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

[clang] Users/mizvekov/dependent elab keyword fixes (PR #135916)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135916 This patches makes the rules for canonicalization of the elaborated keyword uniform between DependentNameType and DependentTemplateSpecializationType. `class` and `struct` keywords are functionally equivalent,

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

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

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135893 >From d06164cda2bccc398a49bbbfadb728184ff6cb73 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300 Subject: [PATCH] [clang] fix a crash in error recovery in expressions resolvi

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135893 >From c52264e0cebe9e32cb92670779e8fb07e63eca5a Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300 Subject: [PATCH] [clang] fix a crash in error recovery in expressions resolvi

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135893 >From 9f3ea29b57cf9d6611073e3235e79490614e9a05 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300 Subject: [PATCH] [clang] fix a crash in error recovery in expressions resolvi

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135893 We were using AssumedTemplate incorrectly for error recovery. Fixes #135621 >From c2a06ac2819014546e60202ce520e5e327f53e5f Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Can you send reproducer and / or stack trace? FYI you can use `CLANG_CRASH_DIAGNOSTICS_DIR` environment variable to make clang put these automatically generated reproducers up in a directory which will have its contents exported as artifacts. https://github.com/llvm/llvm-proje

[clang] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

2025-04-15 Thread Matheus Izvekov via cfe-commits
@@ -466,6 +467,29 @@ class FullSourceLoc : public SourceLocation { } }; +/// A simple pair of identifier info and location. +class IdentifierLoc { + SourceLocation Loc; + IdentifierInfo *II = nullptr; + +public: + IdentifierLoc() = default; + IdentifierLoc(SourceLocation

[clang] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

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

[clang] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: Thanks, I like the idea! https://github.com/llvm/llvm-project/pull/135808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] AST: remove source locations from [Variable/Dependent]SizedArrayType (PR #135511)

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

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

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

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

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

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

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

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I think one option would be to allow differences in macros, and rely on the ODR checker to catch when that would cause problems. https://github.com/llvm/llvm-project/pull/131569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134769 >From e2c40042553845125914e544e696d7e21b553e7d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 7 Apr 2025 22:44:20 -0300 Subject: [PATCH] [clang] consistently quote expressions in diagnostics This ch

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134769 >From 7fe930def5714c196d003e94bafdb4639cea3a43 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 7 Apr 2025 22:44:20 -0300 Subject: [PATCH] [clang] consistently quote expressions in diagnostics This ch

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134769 >From 7a777961125a31a8e721f2f78354a3b21c0a06b2 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 7 Apr 2025 22:44:20 -0300 Subject: [PATCH] [clang] consistently quote expressions in diagnostics This ch

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM as well. https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Could it be you are hitting an overflow/wrap around perhaps? Some of these nodes store the unsignedOrNone representation in a bitfield, but that's still 15 bits. https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: In one of these changes we did bump one of these bit fields down to 15 bits, starting from 16. https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: One thing that looks fishy, but that is even a different node, is this early return on `VisitSubstNonTypeTemplateParmPackExpr` in `ASTReaderStmt`. ```C++ if (ArgPack.getKind() != TemplateArgument::Pack) return; ``` This looks impossible to hit, because `getArgumentPack` c

[clang] [clang] remove unused frontend flag -fretain-subst-template-type-parm-type-ast-nodes (PR #134177)

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

[clang] [clang-tools-extra] [clang] implement printing of canonical expressions (PR #135133)

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

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I plan to merge this tomorrow if there are no further comments. https://github.com/llvm/llvm-project/pull/134769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] implement printing of canonical expressions (PR #135133)

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

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-13 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/135420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] AST: remove source locations from [Variable/Dependent]SizedArrayType (PR #135511)

2025-04-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135511 Source locations should be handled at the TypeLoc level, and these locations are already wired up to the base ArrayLoc. There was nothing important using these, so just remove. >From e01aa7b78e6b1971e2fedbcad7

[clang] [clang-tools-extra] [clang] implement printing of canonical expressions (PR #135133)

2025-04-12 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I've added a few test cases showing the effects on diagnostics. Which is likely to be short lived, as the underlying issue looks easy to solve. I have updated the patch to cover printing of dependent decltype as well. I have looked into also covering DependentSizedArrays, but th

[clang] [clang-tools-extra] [clang] implement printing of canonical expressions (PR #135133)

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

[clang] [clang-tools-extra] [clang] implement printing of canonical expressions (PR #135133)

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

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

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

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

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

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

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

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

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

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

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

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

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Nevermind, I managed to do it :) https://github.com/llvm/llvm-project/pull/135414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [clang] ASTImporter: fix SubstNonTypeTemplateParmExpr source location (PR #135450)

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

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

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

[clang] [clang] ASTImporter: fix SubstNonTypeTemplateParmExpr source location (PR #135450)

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

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

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @slydiman Thanks. You can see I made changes to our CI in this PR, and I managed to enable lldb, enable python testing and everything, but everything still passes in the lldb test suite. This is a linux system, too it should be capable to reproduce this, right? Can you help

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

2025-04-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks for that stack trace, could be unrelated to this, but that still helped find a bug: https://github.com/llvm/llvm-project/pull/135450 https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang] ASTImporter: fix SubstNonTypeTemplateParmExpr source location (PR #135450)

2025-04-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135450 This fixes an issue where an incorrect source location is imported. >From 7c53319c1e7ea35b8fab471b28403b1b84bc59b0 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 11 Apr 2025 19:41:02 -0300 Subject:

  1   2   3   4   5   6   7   8   9   10   >