Skip to content

Commit a56fa16

Browse files
authored
[clang-tidy] Fix failing test after #80864 (#81171)
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.
1 parent a1ed821 commit a56fa16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,6 @@ auto S<>::foo(auto)
6868
{
6969
return 1;
7070
}
71-
// CHECK8: error: template parameter list matching the non-templated nested type 'S<>' should be empty ('template<>') [clang-diagnostic-error]
71+
// CHECK8: error: conflicting types for 'foo' [clang-diagnostic-error]
72+
// CHECK8: note: previous declaration is here
7273
#endif

0 commit comments

Comments
 (0)