Skip to content

Commit

Permalink
[clang-tidy] Fix failing test after #80864 (#81171)
Browse files Browse the repository at this point in the history
The following test case in
`clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp` is
failing:
```
#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
```

#80864 fixes a bug where we would (incorrectly) append invented template
parameters to empty template parameter lists, which causes this test to
fail.
  • Loading branch information
sdkrystian committed Feb 8, 2024
1 parent a1ed821 commit a56fa16
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ 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]
// CHECK8: error: conflicting types for 'foo' [clang-diagnostic-error]
// CHECK8: note: previous declaration is here
#endif

0 comments on commit a56fa16

Please sign in to comment.