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

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 10:34:28 PST 2024


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 <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 ?


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


More information about the cfe-commits mailing list