[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
@@ -10442,32 +10441,54 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, if (getLangOpts().CUDA && !isFunctionTemplateSpecialization) maybeAddCUDAHostDeviceAttrs(NewFD, Previous); -// If it's a friend (and only if it's a friend), it's po

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
@@ -2154,6 +2144,15 @@ bool RecursiveASTVisitor::TraverseFunctionHelper(FunctionDecl *D) { TALI->NumTemplateArgs)); } } +// FIXME: Do we want to traverse the explicit template arguments for sdkrys

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
@@ -650,17 +642,16 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { DependentFunctionTemplateSpecializationInfo * DFTSInfo = D->getDependentSpecializationInfo(); -// Templates. -Record.push_back(DFTSInfo->getNumTemplates()); -for (int i=0, e =

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/2] [clang] remove ClassScopeFunctionSpecializationDecl

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/2] [clang] remove ClassScopeFunctionSpecializationDecl

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian resolved https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/2] [clang] remove ClassScopeFunctionSpecializationDecl

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-21 Thread Krystian Stasiowski via cfe-commits
@@ -1016,21 +1003,20 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { } case FunctionDecl::TK_DependentFunctionTemplateSpecialization: { // Templates. -UnresolvedSet<8> TemplDecls; -unsigned NumTemplates = Record.readInt(); -while (NumTemplates-

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-25 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @erichkeane & @shafik -- I left comments responding to your feedback https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-02 Thread Krystian Stasiowski via cfe-commits
@@ -752,8 +745,6 @@ class CollectExtraHighlightings } if (auto *Args = D->getTemplateSpecializationArgsAsWritten()) H.addAngleBracketTokens(Args->getLAngleLoc(), Args->getRAngleLoc()); -if (auto *I = D->getDependentSpecializationInfo()) - H.addAngleBracke

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @AaronBallman > Can you be sure to file an issue or add a test case + FIXME comment so we > don't lose track of the needed follow-up work, or are you planning to do that > work immediately after this lands? I will address that once this gets merged https://github.com/llvm/l

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/3] [clang] remove ClassScopeFunctionSpecializationDecl

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/4] [clang] remove ClassScopeFunctionSpecializationDecl

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Updated the release notes. I didn't go into exhaustive detail, but I can add more if anyone here deems it necessary @erichkeane @AaronBallman https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From d11d546f3190936ba45c57b4825073026d817878 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/5] [clang] remove ClassScopeFunctionSpecializationDecl

[clang] [clang][Index] Use canonical function parameter types in USRs (PR #68222)

2023-10-04 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/68222 This is necessary to ensure that functions declared in different translation units whose parameter types only differ in top-level cv-qualification generate the same USR. For example: ```cpp // A.cpp void f(

[clang] [clang][Index] Use canonical function parameter types in USRs (PR #68222)

2023-10-04 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/68222 >From db0887d6c68dc5610a9189c96de8fcbb631385a1 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 4 Oct 2023 10:06:28 -0400 Subject: [PATCH] [clang][Index] Use canonical function parameter types in

[clang] [clang][Index] Use canonical function parameter types in USRs (PR #68222)

2023-10-04 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @mizvekov Sure, I'll take care of that tomorrow https://github.com/llvm/llvm-project/pull/68222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-06 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @AaronBallman I don't have write access, so that would be appreciated ๐Ÿ™‚. I was putting off rebasing incase there were more responses to my comments, but I presume that there won't be so I will get it rebased now https://github.com/llvm/llvm-project/pull/66636

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From 9a8db570fab063209a7998bbf631765419034d74 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH 1/5] [clang] remove ClassScopeFunctionSpecializationDecl

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From 4ea4e89cb47ed7e4d3f1cf2a9d99d2f7e9ad33bb Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH] [clang] remove ClassScopeFunctionSpecializationDecl ---

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-10-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/66636 >From 39744e6eb218ae519bcce83d90273296de496d94 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 25 Aug 2023 14:07:32 -0400 Subject: [PATCH] [clang] remove ClassScopeFunctionSpecializationDecl ---

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/66636 This removes the `ClassScopeFunctionSpecializationDecl` `Decl` node, and instead uses `DependentFunctionTemplateSpecializationInfo` to handle such declarations. `DependentFunctionTemplateSpecializationInfo` i

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane > I guess my first question is 'why'? Per the comment you mentioned, it is redundant. Switching to `DependentFunctionTemplateSpecializationInfo` also results in constructs such as: ``` template struct A { template<> void f(); }; ``` being diagnosed prior t

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/81642 >From 0834af0d1fcd2a87656fabdb7b0aee0f42b9b52f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 9 Feb 2024 14:00:49 -0500 Subject: [PATCH 1/2] [Clang] Unify interface for accessing template argume

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/81642 >From 0834af0d1fcd2a87656fabdb7b0aee0f42b9b52f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 9 Feb 2024 14:00:49 -0500 Subject: [PATCH 1/3] [Clang] Unify interface for accessing template argume

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
@@ -285,30 +285,23 @@ template<> class SpecializationDecl; // CHECK: [[@LINE-1]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | | Decl,RelSpecialization | rel: 1 // CHECK-NEXT: RelSpecialization | SpecializationDecl | c:@ST>1#T@SpecializationDecl -

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
@@ -6316,6 +6310,15 @@ TEST(HasAnyTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { hasTypeLoc(loc(asString("double"))); } +TEST(HasAnyTemplateArgumentLoc, BindsToExplicitSpecializationWithIntArgument) { + EXPECT_TRUE( + match

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-15 Thread Krystian Stasiowski via cfe-commits
@@ -2545,10 +2545,12 @@ ASTDeclReader::VisitClassTemplateSpecializationDeclImpl( } // Explicit info. - if (TypeSourceInfo *TyInfo = readTypeSourceInfo()) { -auto *ExplicitInfo = -new (C) ClassTemplateSpecializationDecl::ExplicitSpecializationInfo; -Explici

[clang] Reapply "[Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (#78274)" (PR #79683)

2024-02-15 Thread Krystian Stasiowski via cfe-commits
@@ -885,16 +885,19 @@ bool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, /// that the template parameter 'PrevDecl' is being shadowed by a new /// declaration at location Loc. Returns true to indicate that this is /// an error, and false otherwise.

[clang] Reapply "[Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (#78274)" (PR #79683)

2024-02-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/79683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (#78274)" (PR #79683)

2024-02-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/79683 >From 0d4a6d155b5d70970b63f4337507098ea938f627 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Jan 2024 08:05:33 -0500 Subject: [PATCH] Reapply "[Clang][Sema] Diagnose function/variable templa

[clang] Reapply "[Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (#78274)" (PR #79683)

2024-02-15 Thread Krystian Stasiowski via cfe-commits
@@ -885,16 +885,19 @@ bool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, /// that the template parameter 'PrevDecl' is being shadowed by a new /// declaration at location Loc. Returns true to indicate that this is /// an error, and false otherwise.

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-19 Thread Krystian Stasiowski via cfe-commits
@@ -1792,23 +1807,11 @@ class ClassTemplateSpecializationDecl llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -TypeSourceInfo *TypeAsW

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/82277 We currently accept the following explicit specialization with a warning for the extraneous template parameter list: ```cpp template void f(); template<> template<> void f(); // warning: extraneous template p

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-19 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/82277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/82277 >From c7521b9ad5d86d5817060e777b0da60e2aa96871 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 19 Feb 2024 15:36:10 -0500 Subject: [PATCH 1/2] [Clang][Sema] Convert warning for extraneous templat

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/82277 >From c31ab160b6fb1fb765a885ab3f553437c5768d28 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 19 Feb 2024 15:36:10 -0500 Subject: [PATCH 1/2] [Clang][Sema] Convert warning for extraneous templat

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/82277 >From c31ab160b6fb1fb765a885ab3f553437c5768d28 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 19 Feb 2024 15:36:10 -0500 Subject: [PATCH 1/3] [Clang][Sema] Convert warning for extraneous templat

[clang] [Clang][Sema] Diagnose declarative nested-name-specifiers naming alias templates (PR #80842)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane Should i wait for additional reviews, or can this be merged? https://github.com/llvm/llvm-project/pull/80842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] Reapply "[Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (#78274)" (PR #79683)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
@@ -885,16 +885,19 @@ bool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, /// that the template parameter 'PrevDecl' is being shadowed by a new /// declaration at location Loc. Returns true to indicate that this is /// an error, and false otherwise.

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/82277 >From 0ba458f15e29e4fda7a4bc36d836f018bcc05f66 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 19 Feb 2024 15:36:10 -0500 Subject: [PATCH] [Clang][Sema] Convert warning for extraneous template p

[clang] [Clang][Sema] Convert warning for extraneous template parameter lists to an extension warning (PR #82277)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/82277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose declarative nested-name-specifiers naming alias templates (PR #80842)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80842 >From 3cef590557625cffcfa97f226271027111adc1d0 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 09:14:42 -0500 Subject: [PATCH] [Clang][Sema] Diagnose declarative nested-name-specifiers

[clang] [Clang][Sema] Diagnose declarative nested-name-specifiers naming alias templates (PR #80842)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/80842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/82417 Consider the following: ```cpp struct A { static constexpr bool x = true; }; template void f(T, U) noexcept(T::y); // #1, error: no member named 'y' in 'A' template void f(T, U*) noexcept(T::x); // #2 temp

[clang] [Clang][Sema] Defer instantiation of exception specification until after partial ordering when determining primary template (PR #82417)

2024-02-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/82417 >From 16b6ce3b1895c15ce896c5e8dcbe29ee1274d38b Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 20 Feb 2024 14:03:50 -0500 Subject: [PATCH] [Clang][Sema] Defer instantiation of exception specifica

[clang] [Clang][Sema] Treat explicit specializations of static data member templates declared without 'static' as static data members when diagnosing uses of 'auto' (PR #97425)

2024-07-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/97425 After #93873 clang no longer permits declarations of explicit specializations of static data member templates to use the `auto` _placeholder-type-specifier_: ```cpp struct A { template static constexpr aut

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-07-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > non-static class member @alexfh Missed this one :) Opened a PR to fix this [here](https://github.com/llvm/llvm-project/pull/97425). https://github.com/llvm/llvm-project/pull/93873 ___ cfe-commits mailing list cfe-commits@lists.llv

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

2024-07-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @mizvekov @AaronBallman @cor3ntin 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][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-07-02 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > I've been hinted though that Clang may be incorrect in accepting explicit > specializations of a templated static class data member in the class scope. > It looks like with all the restrictions in the standard it may only be > allowed to place explicit specializations of a

[clang] [Clang][Sema] Fix crash when rebuilding MemberExprs with invalid object expressions (PR #97455)

2024-07-02 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/97455 Fixes #95778 >From 5eb3be349b8ca816bec672a6a423f28c4a50b63c Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 2 Jul 2024 14:03:45 -0400 Subject: [PATCH] [Clang][Sema] Fix crash when rebuilding Mem

[clang] [Clang][Sema] Correctly transform dependent operands of overloaded binary operator& (PR #97596)

2024-07-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/97596 Currently, `TreeTransform::TransformCXXOperatorCallExpr` calls `TreeTransform::TransformAddressOfOperand` to transform the first operand of a `CXXOperatorCallExpr` when its `OverloadOperatorKind` is `OO_Amp`

[clang] [Clang][Sema] Treat explicit specializations of static data member templates declared without 'static' as static data members when diagnosing uses of 'auto' (PR #97425)

2024-07-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/97425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Correctly transform dependent operands of overloaded binary operator& (PR #97596)

2024-07-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/97596 >From d041273f56d59c9f466a9bb9a60b7501daa4844f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 3 Jul 2024 10:47:23 -0400 Subject: [PATCH 1/2] [Clang][Sema] Correctly transform dependent operands

[clang] [Clang][Sema] Fix crash when rebuilding MemberExprs with invalid object expressions (PR #97455)

2024-07-03 Thread Krystian Stasiowski via cfe-commits
@@ -2896,6 +2896,9 @@ class TreeTransform { SS.Adopt(QualifierLoc); Base = BaseResult.get(); +if (Base->containsErrors()) + return ExprError(); sdkrystian wrote: @mizvekov The problems arise when we build a `MemberExpr` for a class member ac

[clang] [Clang][Sema] Fix crash when rebuilding MemberExprs with invalid object expressions (PR #97455)

2024-07-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/97455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix crash when rebuilding MemberExprs with invalid object expressions (PR #97455)

2024-07-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/97455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Correctly transform dependent operands of overloaded binary operator& (PR #97596)

2024-07-03 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/97596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Index] Add support for dependent class scope explicit specializations of function templates to USRGenerator (PR #98027)

2024-07-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/98027 Given the following: ```cpp template struct A { void f(int); // #1 template void f(U); // #2 template<> void f(int); // #3 }; ``` Clang will generate the same USR for `#1` and `#2`

[clang] [Clang][Index] Add support for dependent class scope explicit specializations of function templates to USRGenerator (PR #98027)

2024-07-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/98027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-04 Thread Krystian Stasiowski via cfe-commits
@@ -7981,7 +7969,7 @@ ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SmallVector OperatorArrows; CTypes.insert(Context.getCanonicalType(BaseType)); -while (BaseType->isRecordType()) { +while (BaseType->getAsRecordDecl()) {

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-04 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/104458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/104458 >From 11f67c73a8de04ce94dbed467de043668234e202 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 15 Aug 2024 11:27:34 -0400 Subject: [PATCH 1/4] [Clang][Sema] Use the correct lookup context when

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/104458 >From 11f67c73a8de04ce94dbed467de043668234e202 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 15 Aug 2024 11:27:34 -0400 Subject: [PATCH 1/5] [Clang][Sema] Use the correct lookup context when

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/104458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-09-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/104458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-08-12 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I don't think this is the right approach. What I think we _should_ be doing is to compare the operands of the _noexcept-specifier_ the same way we compare constraints (i.e. substitute so all references to template parameters have the correct depth and _then_ check whether the

[clang] [Clang][Sema] Rebuild template parameters for out-of-line template definitions and partial specializations (PR #104030)

2024-08-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/104030 We need to rebuild the template parameters of out-of-line definitions/specializations of member templates in the context of the current instantiation for the purposes of declaration matching. We already do t

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-08-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/104458 Fixes #104268. Still need tests. >From 9f4fb3fb8df6d0981723ce9b8da809d9f2284348 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 15 Aug 2024 11:27:34 -0400 Subject: [PATCH] [Clang][Sema] Use the

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-08-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/104458 >From 9f4fb3fb8df6d0981723ce9b8da809d9f2284348 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 15 Aug 2024 11:27:34 -0400 Subject: [PATCH 1/2] [Clang][Sema] Use the correct lookup context when

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-05 Thread Krystian Stasiowski via cfe-commits
@@ -131,7 +131,9 @@ struct BuiltinTypeDeclBuilder { DeclarationNameInfo NameInfo = DeclarationNameInfo(DeclarationName(&II), SourceLocation()); LookupResult R(S, NameInfo, Sema::LookupOrdinaryName); -S.LookupParsedName(R, S.getCurScope(), &SS, false); +S

[clang] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base classes (PR #84050)

2024-04-05 Thread Krystian Stasiowski via cfe-commits
@@ -1055,9 +1045,19 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, } } -Diag(R.getNameLoc(), diag::err_no_member) - << MemberName << DC - << (BaseExpr ? BaseExpr->getSourceRange() : SourceRange()); +if (SS.isNotEmpty() &&

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane PR updated. When we encounter a class member access expression with a nested-name-specifier that is invalid, should we simply ignore it and instead use the type of the object expression as the lookup context? This is the current behavior, but it leads to lots of

[clang] [clang-tools-extra] [Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent base clas

2024-04-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > Sorry, I'm not really getting the question here. Obviously that 2nd error is > invalid and we shouldn't be emitting it, and doing the `::z` lookup inside of > `A` seems wrong to me. But I'm not sure I get the issue. We currently emit the second error. I'm asking if we shoul

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/88042 The approved resolution for [CWG2858](https://cplusplus.github.io/CWG/issues/2858.html) changes [[expr.prim.id.qual] p2 sentence 2](https://eel.is/c++draft/expr.prim.id.qual#2) to read: > A declarative _nest

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 >From 9c3b78f1f37049224f31e3bcd07ae8d762b760d1 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 8 Apr 2024 09:46:08 -0400 Subject: [PATCH] [Clang][Sema] Implement approved resolution for CWG2858

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (PR #87541)

2024-04-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @erichkeane :) https://github.com/llvm/llvm-project/pull/87541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (PR #87541)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/87541 >From 6ad6b5e698c3ae6fd8e881582fcfa4c8bb231da4 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 3 Apr 2024 14:33:27 -0400 Subject: [PATCH 1/4] [Clang][Sema] Fix crash when 'this' is used in a dep

[clang] [Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (PR #87541)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/87541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @cor3ntin Should I just move the test from `test/CXX/expr/expr.prim/expr.prim.id/expr.prim.id.qual/p3.cpp` to `test/CXX/drs/dr28xx.cpp`? https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 Unicorn! ยท GitHub body { background-color: #f1f1f1; margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } .container { margin: 50px

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 >From e850ae0982efbb7cec7c33d6b927844d89128743 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 8 Apr 2024 09:46:08 -0400 Subject: [PATCH 1/3] [Clang][Sema] Implement approved resolution for CWG28

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
@@ -58,3 +58,24 @@ void B::g() requires true; #endif } // namespace dr2847 + +namespace dr2858 { // dr2858: 19 + +#if __cplusplus > 202302L + +template +struct A { + // FIXME: The nested-name-specifier in the following friend declarations are declarative, sd

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
@@ -58,3 +58,24 @@ void B::g() requires true; #endif } // namespace dr2847 + +namespace dr2858 { // dr2858: 19 + +#if __cplusplus > 202302L + +template +struct A { + // FIXME: The nested-name-specifier in the following friend declarations are declarative, + // but we don't

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/88139 This patch adds a `Typename` bit-field to `TemplateTemplateParmDecl` which stores whether the template template parameter was declared with the `typename` keyword. >From 5bc0f03437349705ac9dff096fcc0c5b8b16c

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88139 >From a3a9dd90ffd82c738c41c6c581852a10742f2bbc Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 9 Apr 2024 10:51:56 -0400 Subject: [PATCH] [Clang][AST] Track whether template template parameters u

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane I added a release note. Regarding the addition of an enumeration type, how about: ```cpp enum class TypeParmKeyword { Class, Typename }; ``` (I used `TypeParm` because a template template parameter is a _type-parameter_ in the C++ grammar, but I'm open to alte

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 >From e850ae0982efbb7cec7c33d6b927844d89128743 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 8 Apr 2024 09:46:08 -0400 Subject: [PATCH 1/4] [Clang][Sema] Implement approved resolution for CWG28

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 >From e850ae0982efbb7cec7c33d6b927844d89128743 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 8 Apr 2024 09:46:08 -0400 Subject: [PATCH 1/4] [Clang][Sema] Implement approved resolution for CWG28

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 >From e850ae0982efbb7cec7c33d6b927844d89128743 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 8 Apr 2024 09:46:08 -0400 Subject: [PATCH 1/5] [Clang][Sema] Implement approved resolution for CWG28

[clang] [Clang][AST][NFC] Fix printing of dependent PackIndexTypes (PR #88146)

2024-04-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/88146 Dependent `PackIndexType`s currently print the memory address of the index `Expr*` rather than pretty printing the expression. This patch fixes that. >From 04869abc01117c6f4f270b9b9b61cdb2a7e1acc6 Mon Sep 17

[clang] [Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (PR #87541)

2024-04-10 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @rupprecht That's unintended, will revert and address it. https://github.com/llvm/llvm-project/pull/87541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function" (PR #88264)

2024-04-10 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/88264 Reverts llvm/llvm-project#87541 >From 0fa09befb37c36ec1ed796c28f6b33605fc04ecd Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 10 Apr 2024 08:36:37 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"[Cl

[clang] Revert "[Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function" (PR #88264)

2024-04-10 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/88264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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