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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 10:35:39 PST 2024


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 <class T = void>
> struct S
> {
>     auto foo(auto);
> };
> 
> template <>
> auto S<>::foo(auto)
> {
>     return 1;
> }
> // CHECK8: error: template parameter list matching the non-templated nested type 'S<>' should be empty ('template<>') [clang-diagnostic-error]
> #endif
> ```
> 
> Which is failing because we now (correctly) accept this. Can I open a PR that addresses this single test, or would I need to revert and reapply the patch @erichkeane ?

If you act quickly, you can just do a new PR and get quick review from the code owners on clang-tidy, which would not require a revert.  

https://github.com/llvm/llvm-project/pull/80864


More information about the cfe-commits mailing list