[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > Looks like there is a test > (`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp`) that > contains the following: > > ```c++ > #ifdef PR64602 // Should not crash > template > struct S > { > auto foo(auto); > }; > > template <> > auto S<>::foo(auto) > { >

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Nico Weber via cfe-commits
nico wrote: This breaks check-clang-tools: http://45.33.8.238/linux/130320/step_8.txt Please take a look and revert for now if it takes a while to fix. https://github.com/llvm/llvm-project/pull/80864 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > Looks like there is a test > (`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp`) that > contains the following: > > ```c++ > #ifdef PR64602 // Should not crash > template > struct S > { > auto foo(auto); > }; > > template <> > auto S<>::foo(auto) > { >

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Looks like there is a test (`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp`) that contains the following: ```cpp #ifdef PR64602 // Should not crash template struct S { auto foo(auto); }; template <> auto S<>::foo(auto) { return 1; } // CHECK8: error

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

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

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From 908b3a129ec02a7ecae0ed3b8386e4e505274315 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH] [Clang][Sema] Abbreviated function templates do not appen

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From db802e93c08ca1b490b4ad001b3d9ee4347d9eef Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH] [Clang][Sema] Abbreviated function templates do not appen

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From e4386e21a56c0d113c8f263af79fffa072d3da86 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH] [Clang][Sema] Abbreviated function templates do not appen

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From b28a6a478d021a15a6004c4f3f243ce26f6d86d8 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH 1/2] [Clang][Sema] Abbreviated function templates do not

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From 570e25f19b428fb7d2936091726727f9633eec35 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH 1/2] [Clang][Sema] Abbreviated function templates do not

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Krystian Stasiowski via cfe-commits
@@ -9759,7 +9759,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, SmallVector TemplateParamLists; llvm::append_range(TemplateParamLists, TemplateParamListsRef); if (TemplateParameterList *Invented = D.getInventedTemplateParameterList()) { -

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From 570e25f19b428fb7d2936091726727f9633eec35 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH 1/2] [Clang][Sema] Abbreviated function templates do not

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Erich Keane via cfe-commits
@@ -9759,7 +9759,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, SmallVector TemplateParamLists; llvm::append_range(TemplateParamLists, TemplateParamListsRef); if (TemplateParameterList *Invented = D.getInventedTemplateParameterList()) { -

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Krystian Stasiowski via cfe-commits
@@ -9759,7 +9759,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, SmallVector TemplateParamLists; llvm::append_range(TemplateParamLists, TemplateParamListsRef); if (TemplateParameterList *Invented = D.getInventedTemplateParameterList()) { -

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Erich Keane via cfe-commits
@@ -19294,7 +19294,16 @@ void Sema::ActOnStartFunctionDeclarationDeclarator( ExplicitLists, /*IsFriend=*/false, IsMemberSpecialization, IsInvalid, /*SuppressDiagnostic=*/true); } - if (ExplicitParams) { + // C++23 [dcl.fct]p23: + // An abbreviated functio

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Erich Keane via cfe-commits
@@ -9759,7 +9759,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, SmallVector TemplateParamLists; llvm::append_range(TemplateParamLists, TemplateParamListsRef); if (TemplateParameterList *Invented = D.getInventedTemplateParameterList()) { -

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes According to [[dcl.fct] p23](http://eel.is/c++draft/dcl.fct#23): > An abbreviated function template can have a _template-head_. The invented _template-parameters_ are appended to the _template-param

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/80864 According to [[dcl.fct] p23](http://eel.is/c++draft/dcl.fct#23): > An abbreviated function template can have a _template-head_. The invented > _template-parameters_ are appended to the _template-parameter-list